Permalink
Browse files

fixes for exim antispam/antivirus protection

  • Loading branch information...
serghey-rodin committed Sep 25, 2013
1 parent 7d63086 commit 3f5f796637ca930bcb71a66c7f61e3ff2ec687a2
View
@@ -47,20 +47,19 @@ is_package_full 'MAIL_DOMAINS'
mkdir $HOMEDIR/$user/conf/mail/$domain
mkdir $HOMEDIR/$user/mail/$domain_idn
touch $HOMEDIR/$user/conf/mail/$domain/aliases
touch $HOMEDIR/$user/conf/mail/$domain/protection
touch $HOMEDIR/$user/conf/mail/$domain/passwd
# Adding symlink
ln -s $HOMEDIR/$user/conf/mail/$domain /etc/$MAIL_SYSTEM/domains/$domain_idn
# Adding antispam protection
if [ "$antispam" = 'yes' ]; then
echo 'antispam' >> $HOMEDIR/$user/conf/mail/$domain/protection
touch $HOMEDIR/$user/conf/mail/$domain/antispam
fi
# Adding antivirus protection
if [ "$antivirus" = 'yes' ]; then
echo 'antivirus' >> $HOMEDIR/$user/conf/mail/$domain/protection
touch $HOMEDIR/$user/conf/mail/$domain/antivirus
fi
# Adding dkim
@@ -39,10 +39,9 @@ is_object_value_empty 'mail' 'DOMAIN' "$domain" '$ANTISPAM'
# Action #
#----------------------------------------------------------#
# Adding antispam key to config
if [ -z "$(grep spam $HOMEDIR/$user/conf/mail/$domain/protection)" ]; then
echo 'antispam' >> $HOMEDIR/$user/conf/mail/$domain/protection
fi
# Adding antispam flag
touch $HOMEDIR/$user/conf/mail/$domain/antispam
#----------------------------------------------------------#
# Vesta #
@@ -39,10 +39,8 @@ is_object_value_empty 'mail' 'DOMAIN' "$domain" '$ANTIVIRUS'
# Action #
#----------------------------------------------------------#
# Adding antivirus key to config
if [ -z "$(grep 'virus' $HOMEDIR/$user/conf/mail/$domain/protection)" ]; then
echo 'antivirus' >> $HOMEDIR/$user/conf/mail/$domain/protection
fi
# Adding antivirus flag
touch $HOMEDIR/$user/conf/mail/$domain/antivirus
#----------------------------------------------------------#
@@ -39,8 +39,8 @@ is_object_value_exist 'mail' 'DOMAIN' "$domain" '$ANTISPAM'
# Action #
#----------------------------------------------------------#
# Delete antispam key
sed -i "/antispam/d" $HOMEDIR/$user/conf/mail/$domain/protection
# Delete antispam flag
rm -f $HOMEDIR/$user/conf/mail/$domain/antispam
#----------------------------------------------------------#
@@ -39,8 +39,8 @@ is_object_value_exist 'mail' 'DOMAIN' "$domain" '$ANTIVIRUS'
# Action #
#----------------------------------------------------------#
# Delete antivirus key
sed -i "/antivirus/d" $HOMEDIR/$user/conf/mail/$domain/protection
# Delete antivirus flag
rm -f $HOMEDIR/$user/conf/mail/$domain/antivirus
#----------------------------------------------------------#
View
@@ -418,20 +418,21 @@ rebuild_mail_domain_conf() {
ln -s $HOMEDIR/$user/conf/mail/$domain \
/etc/$MAIL_SYSTEM/domains/$domain_idn
rm -f $HOMEDIR/$user/conf/mail/$domain/aliases
rm -f $HOMEDIR/$user/conf/mail/$domain/antispam
rm -f $HOMEDIR/$user/conf/mail/$domain/antivirus
rm -f $HOMEDIR/$user/conf/mail/$domain/protection
rm -f $HOMEDIR/$user/conf/mail/$domain/passwd
touch $HOMEDIR/$user/conf/mail/$domain/aliases
touch $HOMEDIR/$user/conf/mail/$domain/protection
touch $HOMEDIR/$user/conf/mail/$domain/passwd
# Adding antispam protection
if [ "$ANTISPAM" = 'yes' ]; then
echo 'antispam' >> $HOMEDIR/$user/conf/mail/$domain/protection
touch $HOMEDIR/$user/conf/mail/$domain/antispam
fi
# Adding antivirus protection
if [ "$ANTIVIRUS" = 'yes' ]; then
echo 'antivirus' >> $HOMEDIR/$user/conf/mail/$domain/protection
touch $HOMEDIR/$user/conf/mail/$domain/antivirus
fi
# Adding dkim
View
@@ -1,6 +1,6 @@
##########################################################################
#SPAMASSASSIN = yes
SPAM_SCORE = 10
SPAM_SCORE = 50
#CLAMD = yes
##########################################################################

0 comments on commit 3f5f796

Please sign in to comment.