postfix option "milter_header_checks" doesn't work

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
User avatar
SEA80
Posts: 7
Joined: Fri Mar 09, 2018 2:59 pm

postfix option "milter_header_checks" doesn't work

Postby SEA80 » Mon May 14, 2018 5:37 pm

I have two-servers Zimbra 8.8.7 FOSS installation (mta+proxy & ldap+store). I tried to add after-milter header checks in postfix using option milter_header_check in main.cf file.

I've replaced spamassassin to rspamd using https://forums.zimbra.org/viewtopic.php?f=15&t=62443 with some modifications:
1)

Code: Select all

zmprov ms $(hostname) zimbraMtaSmtpdMilters "inet:localhost:11332"
instead of

Code: Select all

zmprov ms $(hostname) zimbraMtaSmtpdMilters "smtpd_milters=inet:localhost:11332"
2)

Code: Select all

zmprov ms $(hostname) zimbraMtaMilterDefaultAction "accept"
3) left /opt/zimbra/conf/zmconfigd.cf unchanged
4) did not comment anything in /opt/zimbra/common/conf/main.cf file, just added:

Code: Select all

milter_header_checks = pcre:/opt/zimbra/conf/milter_header_checks
milter_protocol = 6
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
milter_rcpt_macros = i {rcpt_addr}
5) created an /opt/zimbra/conf/milter_header_checks file

Code: Select all

$ cat /opt/zimbra/conf/milter_header_checks
/test spam message/ DISCARD

Result config is:

Code: Select all

$ cat /opt/zimbra/common/conf/main.cf | grep milter
milter_header_checks = pcre:/opt/zimbra/conf/milter_header_checks
milter_content_timeout = 300s
milter_connect_timeout = 30s
milter_default_action = accept
smtpd_milters = inet:localhost:11332, inet:localhost:7026
milter_protocol = 6
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
milter_rcpt_macros = i {rcpt_addr}
milter_command_timeout = 30s
non_smtpd_milters =

Code: Select all

$ zmprov gs $(hostname) | grep -i Milter
zimbraMilterBindAddress: localhost
zimbraMilterBindPort: 7026
zimbraMilterMaxConnections: 20000
zimbraMilterNumThreads: 100
zimbraMilterServerEnabled: TRUE
zimbraMtaMilterCommandTimeout: 30s
zimbraMtaMilterConnectTimeout: 30s
zimbraMtaMilterContentTimeout: 300s
zimbraMtaMilterDefaultAction: accept
zimbraMtaSmtpdMilters: inet:localhost:11332

After restarting services all header_checks works fine, but milter_header_checks doesn't.
If I add a link to the milter_header_checks file as a second pcre-filter to zimbraMtaHeaderChecks variable, it works. But I want to check email headers after rspamd milter.
There's absolutely nothing in logs about milter_header_checks.
Have any ideas?


Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 16 guests