Commits

Zhang Huangbin committed 5a6e754

Set @local_domains_maps=1; in Amavisd, used to mark all domains as local domains.

Comments (0)

Files changed (1)

iRedMail/functions/amavisd.sh

 
     export HOSTNAME FIRST_DOMAIN
     perl -pi -e 's/^(\$mydomain)/$1\ =\ \"$ENV{HOSTNAME}\"\;\t#/' ${AMAVISD_CONF}
-    perl -pi -e 's/(.*local_domains_maps.*)(].*)/${1},"$ENV{FIRST_DOMAIN}"${2}/' ${AMAVISD_CONF}
+    perl -pi -e 's/^(\@local_domains_maps)(.*=.*)/${1} = 1;/' ${AMAVISD_CONF}
 
     if [ X"${DISTRO}" == X"RHEL" -a X"${DISTRO_VERSION}" == X"6" ]; then
         perl -pi -e 's#(.*--tempdir=).*\{\}(.*)#${1}$ENV{AMAVISD_TEMPDIR}${2}#' ${AMAVISD_CONF}
 ${CONF}
 
 chomp(\$mydomain = "${HOSTNAME}");
-@local_domains_maps = ['${HOSTNAME}', '${FIRST_DOMAIN}'];
+@local_domains_maps = 1;
 @mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
                   10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );