On 4/4/2011 9:54 PM, email builder wrote:

OK, sorry again.  I had assumed because you can turn off header checking by
using receive_override_options, you could also override (change) them.

It is possible to override header_checks by defining a different cleanup_service_name for smtpd, then defining that cleanup service with a header_checks override. This can get pretty messy, you can find examples in the list archives.

The better solution is to use multiple instances. All postfix versions support multiple instances. Newer versions include tools to make multiple instance creation/maintenance easier.


Reading smtpd(8) manpage, it does seem like smtpd_data_restrictions would be a
good place to be able to inspect the mail headers and use the PREPEND to insert
a new header.  But I was using check_client_access to do so, and that only seems
to inspect the client address and related information....  but looking through
the list of restrictions I cannot understand which one allows the inspection of
the message data itself.

The postfix smtpd_*_restrictions allow you to inspect envelope information.

To inspect message header or body contents, postfix provides header_checks, body_checks, and an interface for an external content filter, proxy, or milter.
http://www.postfix.org/CONTENT_INSPECTION_README.html


and before you try it and complain about it not working -- No, you cannot use body_checks to PREPEND a new header.

Reply via email to