X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fpostfix.sh;h=9099243eda301347cfeaa8fdcbe47487eac10a82;hb=9667493ddaf016f1faf52e09e071973daab7c346;hp=1d74552dd4a268f49e71a73b1ab00c150e443050;hpb=f79a8b07f4b60324b7663f33ba10d057a7fa5e26;p=amavisd-cn.git diff --git a/src/postfix.sh b/src/postfix.sh index 1d74552..9099243 100755 --- a/src/postfix.sh +++ b/src/postfix.sh @@ -5,10 +5,14 @@ update_postfix() { dpkg --compare-versions "$2" lt $MASTTMPLVERSION ); then noisy_backup /etc/postfix/master.cf cp-update $PKG /etc/postfix/master.cf < $MASTTMPL + restart_mta=1 fi - # main.cf - postconf -e content_filter="smtp-amavis:[127.0.0.1]:10024" - - restart_mta=1 + # set up main.cf + if [ ! -f /etc/postfix/main.cf ] || \ + ! grep -q "^content_filter[\t ]*=[\t ]*smtp-amavis:\[127.0.0.1\]:10024[\t ]*" \ + /etc/postfix/main.cf; then + postconf -e content_filter="smtp-amavis:[127.0.0.1]:10024" + restart_mta=1 + fi }