mailcow/data/Dockerfiles/postfix/whitelist_forwardinghosts.sh

13 lines
317 B
Bash
Raw Normal View History

#!/bin/bash
while read QUERY; do
QUERY=($QUERY)
if [ "${QUERY[0]}" != "get" ]; then
echo "500 dunno"
continue
fi
2017-12-09 20:15:24 +08:00
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