Commits

Zhang Huangbin committed 3894acb

Fix FreeBSD Jail support:
- Add @inte_acl in amavisd.conf.
- Append Jail IP in mynetworks of transport [JailIP]:10025.
- Don't listen on IPv6 addresses in Dovecot by default.

  • Participants
  • Parent commits 4da2e7e

Comments (0)

Files changed (3)

File iRedMail/conf/amavisd

 
 # Syslog setting, 'YES' or 'NO'
 export AMAVISD_SEPERATE_LOG='NO'
+
+# mynetworks
+export AMAVISD_MYNETWORKS='127.0.0.0/8'
+if [ X"${LOCAL_ADDRESS}" != X'127.0.0.1' ]; then
+    export AMAVISD_MYNETWORKS="${AMAVISD_MYNETWORKS},${LOCAL_ADDRESS}"
+fi

File iRedMail/functions/amavisd.sh

         fi
     fi
 
+    if [ X"${LOCAL_ADDRESS}" != X'127.0.0.1' ]; then
+        # ACL
+        cat >> ${AMAVISD_CONF} <<EOF
+@inet_acl = qw(${LOCAL_ADDRESS});
+EOF
+    fi
+
     cat >> ${AMAVISD_CONF} <<EOF
 
 1;  # insure a defined return
     -o smtpd_recipient_restrictions=permit_mynetworks,reject
     -o smtpd_end_of_data_restrictions=
     -o mynetworks_style=host
-    -o mynetworks=127.0.0.0/8
+    -o mynetworks=${AMAVISD_MYNETWORKS}
     -o strict_rfc821_envelopes=yes
     -o smtpd_error_sleep_time=0
     -o smtpd_soft_error_limit=1001

File iRedMail/samples/dovecot/dovecot2.conf

 #   - '*' means all available IPv4 addresses.
 #   - '[::]' means all available IPv6 addresses.
 # Listen on all available addresses by default
-listen = *, [::]
+listen = *
 
 #base_dir = PH_BASE_DIR