mailcow/data/conf/postfix/whitelist_forwardinghosts.sh

13 lines
322 B
Bash
Raw Normal View History

2017-04-17 21:42:35 +08:00
#!/bin/bash
while read QUERY; do
2017-04-17 21:42:35 +08:00
QUERY=($QUERY)
if [ "${QUERY[0]}" != "get" ]; then
echo "500 dunno"
continue
fi
result=$(curl -s http://172.22.1.251:8081/forwardinghosts.php?host=${QUERY[1]})
logger -t whitelist_forwardinghosts -p mail.info "Look up ${QUERY[1]} on whitelist, result $result"
echo $result
2017-04-17 21:42:35 +08:00
done