mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-10-13 07:17:11 +00:00
Improvements to forwarding hosts in Postfix
- No more premature EOF and no more leaking of bash processes
- Log result
- Correctly treat non-CIDR entries
- Adapt to schema change from df71e97
- Correctly report SQL failure
This commit is contained in:
1 parent
df71e97a09
commit
894d6234e9
2 files changed
+10
-6
No files matched your search
@@ -1,11 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
while true; do
|
||||
read QUERY
|
||||
while read QUERY; do
|
||||
QUERY=($QUERY)
|
||||
if [ "${QUERY[0]}" != "get" ]; then
|
||||
echo "500 dunno"
|
||||
continue
|
||||
fi
|
||||
echo $(curl -s http://172.22.1.251:8081/forwardinghosts.php?host=${QUERY[1]})
|
||||
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
|
||||
done
|
||||
Reference in new issue
Block a user