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/conf/mail/$domain
mkdir $HOMEDIR/$user/mail/$domain_idn mkdir $HOMEDIR/$user/mail/$domain_idn
touch $HOMEDIR/$user/conf/mail/$domain/aliases touch $HOMEDIR/$user/conf/mail/$domain/aliases
touch $HOMEDIR/$user/conf/mail/$domain/protection
touch $HOMEDIR/$user/conf/mail/$domain/passwd touch $HOMEDIR/$user/conf/mail/$domain/passwd
# Adding symlink # Adding symlink
@ -55,12 +54,12 @@ ln -s $HOMEDIR/$user/conf/mail/$domain /etc/$MAIL_SYSTEM/domains/$domain_idn
# Adding antispam protection # Adding antispam protection
if [ "$antispam" = 'yes' ]; then if [ "$antispam" = 'yes' ]; then
echo 'antispam' >> $HOMEDIR/$user/conf/mail/$domain/protection touch $HOMEDIR/$user/conf/mail/$domain/antispam
fi fi
# Adding antivirus protection # Adding antivirus protection
if [ "$antivirus" = 'yes' ]; then if [ "$antivirus" = 'yes' ]; then
echo 'antivirus' >> $HOMEDIR/$user/conf/mail/$domain/protection touch $HOMEDIR/$user/conf/mail/$domain/antivirus
fi fi
# Adding dkim # Adding dkim

View file

@ -39,10 +39,9 @@ is_object_value_empty 'mail' 'DOMAIN' "$domain" '$ANTISPAM'
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
# Adding antispam key to config # Adding antispam flag
if [ -z "$(grep spam $HOMEDIR/$user/conf/mail/$domain/protection)" ]; then touch $HOMEDIR/$user/conf/mail/$domain/antispam
echo 'antispam' >> $HOMEDIR/$user/conf/mail/$domain/protection
fi
#----------------------------------------------------------# #----------------------------------------------------------#
# Vesta # # Vesta #

View file

@ -39,10 +39,8 @@ is_object_value_empty 'mail' 'DOMAIN' "$domain" '$ANTIVIRUS'
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
# Adding antivirus key to config # Adding antivirus flag
if [ -z "$(grep 'virus' $HOMEDIR/$user/conf/mail/$domain/protection)" ]; then touch $HOMEDIR/$user/conf/mail/$domain/antivirus
echo 'antivirus' >> $HOMEDIR/$user/conf/mail/$domain/protection
fi
#----------------------------------------------------------# #----------------------------------------------------------#

View file

@ -39,8 +39,8 @@ is_object_value_exist 'mail' 'DOMAIN' "$domain" '$ANTISPAM'
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
# Delete antispam key # Delete antispam flag
sed -i "/antispam/d" $HOMEDIR/$user/conf/mail/$domain/protection rm -f $HOMEDIR/$user/conf/mail/$domain/antispam
#----------------------------------------------------------# #----------------------------------------------------------#

View file

@ -39,8 +39,8 @@ is_object_value_exist 'mail' 'DOMAIN' "$domain" '$ANTIVIRUS'
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
# Delete antivirus key # Delete antivirus flag
sed -i "/antivirus/d" $HOMEDIR/$user/conf/mail/$domain/protection 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 \ ln -s $HOMEDIR/$user/conf/mail/$domain \
/etc/$MAIL_SYSTEM/domains/$domain_idn /etc/$MAIL_SYSTEM/domains/$domain_idn
rm -f $HOMEDIR/$user/conf/mail/$domain/aliases 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/protection
rm -f $HOMEDIR/$user/conf/mail/$domain/passwd rm -f $HOMEDIR/$user/conf/mail/$domain/passwd
touch $HOMEDIR/$user/conf/mail/$domain/aliases touch $HOMEDIR/$user/conf/mail/$domain/aliases
touch $HOMEDIR/$user/conf/mail/$domain/protection
touch $HOMEDIR/$user/conf/mail/$domain/passwd touch $HOMEDIR/$user/conf/mail/$domain/passwd
# Adding antispam protection # Adding antispam protection
if [ "$ANTISPAM" = 'yes' ]; then if [ "$ANTISPAM" = 'yes' ]; then
echo 'antispam' >> $HOMEDIR/$user/conf/mail/$domain/protection touch $HOMEDIR/$user/conf/mail/$domain/antispam
fi fi
# Adding antivirus protection # Adding antivirus protection
if [ "$ANTIVIRUS" = 'yes' ]; then if [ "$ANTIVIRUS" = 'yes' ]; then
echo 'antivirus' >> $HOMEDIR/$user/conf/mail/$domain/protection touch $HOMEDIR/$user/conf/mail/$domain/antivirus
fi fi
# Adding dkim # Adding dkim

View file

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