浏览代码

Merge branch 'master' of https://github.com/mailcow/mailcow-dockerized

andryyy 5 年之前
父节点
当前提交
835654e267
共有 2 个文件被更改,包括 8 次插入4 次删除
  1. 7 3
      data/conf/postfix/anonymize_headers.pcre
  2. 1 1
      data/conf/postfix/main.cf

+ 7 - 3
data/conf/postfix/anonymize_headers.pcre

@@ -3,9 +3,13 @@ if /^\s*Received:.*Authenticated sender.*\(Postcow\)/
 /^Received: from .*? \([\w-.]* \[.*?\]\)(.*|\n.*)\(Authenticated sender: (.+)\)\s+by.+\(Postcow\) with (.*)/
   REPLACE Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with $3
 endif
-if /^\s*Received: from rspamd \(.*mailcow-network.*\).*\(Postcow\)/
-/^Received: from rspamd (.*|\n.*)\((.+) (.+)\)\s+by (.+\(Postcow\)) with (.*)/
-  REPLACE Received: from rspamd (RSPAMD_HOST $3) by $4 with $5
+if /^\s*Received: from.* \(.*dovecot-mailcow.*mailcow-network.*\).*\(Postcow\)/
+/^Received: from.* (.*|\n.*)\((.+) (.+)\)\s+by (.+) \(Postcow\) with (.*)/
+  REPLACE Received: from sieve (sieve $3) by $4 (Postcow) with $5
+endif
+if /^\s*Received: from.* \(.*rspamd-mailcow.*mailcow-network.*\).*\(Postcow\)/
+/^Received: from.* (.*|\n.*)\((.+) (.+)\)\s+by (.+) \(Postcow\) with (.*)/
+  REPLACE Received: from rspamd (rspamd $3) by $4 (Postcow) with $5
 endif
 /^\s*X-Enigmail/        IGNORE
 /^\s*X-Mailer/          IGNORE

+ 1 - 1
data/conf/postfix/main.cf

@@ -172,7 +172,7 @@ non_smtpd_milters = inet:rspamd:9900
 milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
 mydestination = localhost.localdomain, localhost
 # Prefere IPv4, useful for v4-only envs
-smtp_address_preference = ipv4
+smtp_address_preference = any
 smtp_sender_dependent_authentication = yes
 smtp_sasl_auth_enable = yes
 smtp_sasl_password_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_sasl_passwd_maps_sender_dependent.cf