Skip to content

Commit 64f1c03

Browse files
committed
Disable anti spam/virsus when not installed
v-add-mail-domain set antispam / antivirus to yes when not installed...
1 parent 02e2728 commit 64f1c03

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

bin/v-add-mail-domain

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,19 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
122122
if [ ! -z "$local_ip" ]; then
123123
echo "$local_ip" > $HOMEDIR/$user/conf/mail/$domain/ip
124124
fi
125-
126-
# Adding antispam protection
127-
if [ "$antispam" = 'yes' ]; then
128-
touch $HOMEDIR/$user/conf/mail/$domain/antispam
125+
126+
if [ -n "ANTIVIRUS_SYSTEM" ]; then
127+
# Adding antispam protection
128+
if [ "$antispam" = 'yes' ]; then
129+
touch $HOMEDIR/$user/conf/mail/$domain/antispam
130+
fi
129131
fi
130-
131-
# Adding antivirus protection
132-
if [ "$antivirus" = 'yes' ]; then
133-
touch $HOMEDIR/$user/conf/mail/$domain/antivirus
132+
133+
if [ -n "ANTISPAM_SYSTEM" ]; then
134+
# Adding antivirus protection
135+
if [ "$antivirus" = 'yes' ]; then
136+
touch $HOMEDIR/$user/conf/mail/$domain/antivirus
137+
fi
134138
fi
135139

136140
# Adding dkim support

0 commit comments

Comments
 (0)