#!/bin/bash set -e paramdir="/etc/local-COMMON/postfix" function getlinefromfile() { param="$1" echo -n "$param = " cat $paramdir/$param | grep -v '^#' | sed 's/#.*//' | tr "\n" "," | sed -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`" /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 # RBLs replaced with those recommended by http://www.antispews.org/ # Here's a convenient overview of different blackholes: # http://rbls.org/