summaryrefslogtreecommitdiff
path: root/postfix
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2003-07-20 20:13:42 +0000
committerJonas Smedegaard <dr@jones.dk>2003-07-20 20:13:42 +0000
commit5e9d817f3a58204153ffe7e38954ffcc146602b6 (patch)
treed977a77ba1af48373e6cce747970ea05696cb51b /postfix
parent5911697ac2290e3f7e4fc2c0f654e368ebb359af (diff)
Add AMaViS mail accounts (direct file stores).
Diffstat (limited to 'postfix')
-rwxr-xr-xpostfix/postfix.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/postfix/postfix.sh b/postfix/postfix.sh
index a52ee9c..4ff4970 100755
--- a/postfix/postfix.sh
+++ b/postfix/postfix.sh
@@ -3,7 +3,7 @@
# /etc/local-COMMON/postfix/postfix.sh
# Copyright 2002-2003 Jonas Smedegaard <dr@jones.dk>
#
-# $Id: postfix.sh,v 1.20 2003-07-12 13:57:59 jonas Exp $
+# $Id: postfix.sh,v 1.21 2003-07-20 20:13:42 jonas Exp $
#
# Auto-tweak plain installed postfix Debian package
#
@@ -118,6 +118,21 @@ if [ -x /usr/sbin/amavisd -o -x /usr/sbin/amavisd-new ]; then
cat $confdir/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' >> $confdir/master.cf
$postconf -e 'content_filter = smtp-amavis:[127.0.0.1]:10024'
+ $postconf -e 'allow_mail_to_file = yes'
+ mkdir -p /var/lib/amavis/mboxes
+ chown nobody.nogroup /var/lib/amavis/mboxes
+ for mail in virus-quarantine virusalert spam-quarantine spamalert; do
+ touch /var/lib/amavis/mboxes/$mail
+ chown nobody.nogroup /var/lib/amavis/mboxes/$mail
+ if grep -vq "^$mail:" /etc/aliases; then
+ echo "$mail: /var/lib/amavis/mboxes/$mail" >> /etc/aliases
+ newaliases
+ fi
+ done
+ if grep -vq "^spam.police:" /etc/aliases; then
+ echo "spam.police: root" >> /etc/aliases
+ newaliases
+ fi
fi
/etc/init.d/postfix reload