fixes for exim antispam/antivirus protection

This commit is contained in:
Serghey Rodin 2013-09-25 13:26:05 +03:00
commit 3f5f796637
7 changed files with 16 additions and 19 deletions

View file

@ -47,7 +47,6 @@ 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
@ -55,12 +54,12 @@ 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

View file

@ -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 #

View file

@ -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
#----------------------------------------------------------#

View file

@ -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
#----------------------------------------------------------#

View file

@ -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 file

@ -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 file

@ -1,6 +1,6 @@
##########################################################################
#SPAMASSASSIN = yes
SPAM_SCORE = 10
SPAM_SCORE = 50
#CLAMD = yes
##########################################################################