breadcrumb

[SOLVED] zimbra 8 header_checks

 ( sj | 2013.06.12. 17:14:56 )
I had a simple task for zimbra 8.0.4: log the subject of each and every message it receives.

I thought that it must have been an easy task, so I created a header_checks file:

/opt/zimbra/conf/custom_header_checks:

/^Subject:/ WARN subject

Added header_checks=pcre:/opt/zimbra/conf/custom_header_checks to /opt/zimbra/conf/main.cf, then reloaded postfix, and .... nothing happened.

I'm pretty sure that it should have worked, so after googling I found a few forum topics on the zimbra site, however without any usable solutions.

So I was on my own, and I figured out that whenever I issued the "postfix reload" command then zimbra regenerated main.cf. Too bad, even though I executed the following command that I had found somewhere on the net:

zmlocalconfig -e postfix_header_checks="pcre:/opt/zimbra/conf/postfix_header_checks, pcre:/opt/zimbra/conf/custom_header_checks"

after "postfix reload" the value of header_checks was empty again. Arrrgh!

The final [del]solution[/del] workaround is that edit ~zimbra/bin/postfix, and add the following line:

postconf -e header_checks=pcre:/opt/zimbra/conf/postfix_header_checks,pcre:/opt/zimbra/conf/custom_header_checks

before executing

sudo ${zimbra_home}/postfix/sbin/postfix "$@"


Now I can edit /opt/zimbra/conf/custom_header_checks, then execute "postfix reload", and .... it works!

I think the preferred solution would be if zimbra added a textarea field to the web based gui (on port 7071/tcp) to hold header_checks (and perhaps body_checks) fields.
Címkék: zimbra 8, header_checks, solved

5147 olvasás