Hi,
I wonder if there is a mechanism to implement a function to whitelist
mime_header_checks or not.
I read this is not possible, I also read this is possible with separate
cleanup (because header_checks and mime_header_cheks belongs to cleanup)
and smtpd in master.cf... 50:50
I have a mime_header_checks statement in my main.cf rejecting mails with
specific attachements. Some hosts sending these attachements on
purpose needs to be whitelisted. So I implemented this in main.cf:
header_checks=pcre:/etc/postfix/whitelist
mime_header_checks=regexp:/etc/postfix/blocked_attachements
/etc/postfix/whitelist looks this way:
/from@mail\.address/ FILTER smtp:[127.0.0.1]:10027
Then I appended in master.cf the following:
wl-cleanup unix n - n - - cleanup
-o header_checks=
-o mime_header_checks=
127.0.0.1:10027 inet n - n - - smtpd
-o cleanup_service_name=wl-cleanup
What now happens is the following:
Without my whitelist header_checks statement (master.cf modification
does not kick in) the mail comes in and gets filtered by cleanup
"Message content rejected" -> OK
With my whitelist header_checks
statement I see an additional line in the logfile with statement
"filter: " and its argument is, it is routed to 127.0.0.1:10027, looks
fine so far.
But then comes a log line from postfix/cleanup yielding in "Message
content rejected" -> NOK
What I wonder is, is this ought to be working anyway? I see snippets in
internet of customized -o cleanup_service_name= appended to smtpd or
submission or pickup statements, which is the correct one?
Additionally, if my "-o cleanup_service_name=wl-cleanup" would kick in,
should next cleanup log line entry in mail.log not be named something
like
coming from
TIMESTAMP postfix/wl-cleanup [PID] ?
For example, there is a (rather ancient) mail thread from 2010
http://thread.gmane.org/gmane.mail.postfix.user/215219
where its said half/half: a) it only works with two instances and b) a
suggestion of the above way...
Kind Regards
Konstantin Kletschke