diff options
Diffstat (limited to 'postfix/anti-uce.sh')
-rwxr-xr-x | postfix/anti-uce.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/postfix/anti-uce.sh b/postfix/anti-uce.sh index 6eaca24..2aaf068 100755 --- a/postfix/anti-uce.sh +++ b/postfix/anti-uce.sh @@ -4,22 +4,22 @@ set -e paramdir="/etc/local-COMMON/postfix" -function getlinefromfile() { +function getlinesfromfile() { param="$1" echo -n "$param = " - cat $paramdir/$param | grep -v '^#' | sed 's/#.*//' | tr "\n" "," | sed -e 's/[, ]\+/,/g' -e 's/,$//' + cat $paramdir/$param | grep -v '^#' | sed 's/#.*//' | tr "\n" "," | sed -e 's/^[, ]*//' -e 's/[, ]\+/,/g' -e 's/,$//' } postconf -e "smtpd_helo_required = yes" -postconf -e "permit_mx_backup_networks = /etc/local-COMMON/postfix/mx_networks" -postconf -e "`getlinefromfile maps_rbl_domains`" -postconf -e "`getlinefromfile smtpd_recipient_restrictions`" +postconf -e "`getlinesfromfile permit_mx_backup_networks`" +postconf -e "`getlinesfromfile maps_rbl_domains`" +postconf -e "`getlinesfromfile smtpd_recipient_restrictions`" /etc/init.d/postfix reload # Based on this: http://jimsun.linxnet.com/misc/postfix-anti-UCE.txt -# Support fortrusted MX backup networks added -# PCRE stuff avoided,as PCRE is only optional on newest Debian packages +# Support for trusted MX backup networks added +# PCRE stuff avoided, as PCRE is only optional on newest Debian packages # RBLs replaced with those recommended by http://www.antispews.org/ # Here's a convenient overview of different blackholes: |