Move forwarding host script to Docker image
parent
755da65426
commit
40f86057e5
|
@ -35,6 +35,7 @@ COPY zeyple.py /usr/local/bin/zeyple.py
|
||||||
COPY zeyple.conf /etc/zeyple.conf
|
COPY zeyple.conf /etc/zeyple.conf
|
||||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
COPY postfix.sh /opt/postfix.sh
|
COPY postfix.sh /opt/postfix.sh
|
||||||
|
COPY whitelist_forwardinghosts.sh /usr/local/bin/whitelist_forwardinghosts.sh
|
||||||
|
|
||||||
EXPOSE 588
|
EXPOSE 588
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
while read QUERY; do
|
||||||
|
QUERY=($QUERY)
|
||||||
|
if [ "${QUERY[0]}" != "get" ]; then
|
||||||
|
echo "500 dunno"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
result=$(curl -s http://nginx:8081/forwardinghosts.php?host=${QUERY[1]})
|
||||||
|
logger -t whitelist_forwardinghosts -p mail.info "Look up ${QUERY[1]} on whitelist, result $result"
|
||||||
|
echo ${result}
|
||||||
|
done
|
Loading…
Reference in New Issue