Commits

Zhang Huangbin committed 20603e8

Disable [xxx]_destiny in sample Amavisd config file to avoid duplicate.
Thanks Frank <frank _at_ clearfinity.com> for the report.

Comments (0)

Files changed (2)

iRedMail/conf/core

     fi
 }
 
+read_setting()
+{
+    answer="${1}"
+    if [ ! -z "${answer}" ]; then
+        ANSWER="${answer}"
+        echo ${ANSWER}
+    else
+        read ANSWER
+    fi
+}
+
 backup_file()
 {
     # Usage: backup_file file1 [file2 file3 ... fileN]
     fi
 }
 
-read_setting()
-{
-    answer="${1}"
-    if [ ! -z "${answer}" ]; then
-        ANSWER="${answer}"
-        echo ${ANSWER}
-    else
-        read ANSWER
-    fi
-}
-
 hash_domain()
 {
     # Usage: hash_domain domain

iRedMail/functions/amavisd.sh

 
 amavisd_config_general()
 {
+    # Disable $final_xxx_destiny to avoid duplicate
+    perl -pi -e 's/^(\$final_virus_destiny.*)/#${1}/' ${AMAVISD_CONF}
+    perl -pi -e 's/^(\$final_banned_destiny.*)/#${1}/' ${AMAVISD_CONF}
+    perl -pi -e 's/^(\$final_spam_destiny.*)/#${1}/' ${AMAVISD_CONF}
+    perl -pi -e 's/^(\$final_bad_header_destiny.*)/#${1}/' ${AMAVISD_CONF}
+
     cat >> ${AMAVISD_CONF} <<EOF
 # Set hostname.
 \$myhostname = "${HOSTNAME}";