summaryrefslogtreecommitdiff
path: root/postfix
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2007-12-05 10:06:53 +0000
committerJonas Smedegaard <dr@jones.dk>2007-12-05 10:06:53 +0000
commit6545a6999965b1bec32e8bcb600e8a556d25d16b (patch)
treed7642a3455620dff82f121fb3a124ad178dbf007 /postfix
parenta85d338459d6aaed71ed0a7efdfe95b9cfc995d5 (diff)
Use improved amavis config.
Diffstat (limited to 'postfix')
-rwxr-xr-xpostfix/postfix.sh29
1 files changed, 26 insertions, 3 deletions
diff --git a/postfix/postfix.sh b/postfix/postfix.sh
index 3685a04..93f49ad 100755
--- a/postfix/postfix.sh
+++ b/postfix/postfix.sh
@@ -3,7 +3,7 @@
# /etc/local-COMMON/postfix/postfix.sh
# Copyright 2002-2007 Jonas Smedegaard <dr@jones.dk>
#
-# $Id: postfix.sh,v 1.61 2007-12-05 09:53:38 jonas Exp $
+# $Id: postfix.sh,v 1.62 2007-12-05 10:06:53 jonas Exp $
#
# Auto-tweak plain installed postfix Debian package
#
@@ -226,9 +226,32 @@ fi
if [ -x /usr/sbin/amavisd ] || [ -x /usr/sbin/amavisd-new ]; then
$postconf -c "$tempdir" -e 'max_use = 10' # Avoid too much reuse
cat $tempdir/master.cf | egrep -q "^smtp-amavis$sp" || \
- echo "smtp-amavis unix - - n - 2 lmtp -o smtp_data_done_timeout=1200s -o smtp_never_send_ehlo=yes -o disable_dns_lookups=yes" >> $tempdir/master.cf
+ cat >> $tempdir/master.cf << EOF
+smtp-amavis unix - - n - 5 smtp
+ -o smtp_data_done_timeout=1200s
+ -o smtp_never_send_ehlo=yes
+ -o smtp_send_xforward_command=yes
+ -o disable_dns_lookups=yes
+ -o max_use=20
+EOF
cat $tempdir/master.cf | egrep -q "^127.0.0.1:10025$sp" || \
- echo '127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_helo_restrictions= -o smtpd_client_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes' >> $tempdir/master.cf
+ cat >> $tempdir/master.cf << EOF
+127.0.0.1:10025 inet n - n - - smtpd
+ -o content_filter=
+ -o local_recipient_maps=
+ -o relay_recipient_maps=
+ -o smtpd_restriction_classes=
+ -o smtpd_delay_reject=no
+ -o smtpd_client_restrictions=permit_mynetworks,reject
+ -o smtpd_helo_restrictions=
+ -o smtpd_sender_restrictions=
+ -o smtpd_recipient_restrictions=permit_mynetworks,reject
+ -o mynetworks_style=host
+ -o mynetworks=127.0.0.0/8
+ -o strict_rfc821_envelopes=yes
+ -o smtpd_error_sleep_time=0
+ -o smtpd_soft_error_limit=1001
+EOF
$postconf -c "$tempdir" -e 'content_filter = smtp-amavis:[127.0.0.1]:10024'
fi