> On May 7, 2016, at 8:31 AM, Wietse Venema <[email protected]> wrote:
> 
>> What I'm currently trying to get working is a service entry in master.cf
>> that has its own header checks conf file. This service would only be
>> used for specific sender addresses in order to limit the header removal
>> to just those email notifications generated by Google Calendar.
> 
> Postfix can't do this on the receiving end, but you can do it on the
> delivering end.

Well, Postfix can do this on the sending end via:

    main.cf:
        # Resolve sieve auto-forwarder sender address to "autosieve" transport
        sender_dependent_default_transport_maps = ...
        autosieve_header_checks = pcre:${config_directory}/autosieve.pcre

    master.cf:
        autosieve unix ... smtp
            -o smtp_header_checks=$autosieve_header_checks

    autosieve.pcre:
        /^Auto-Submitted:/      IGNORE

    
http://www.postfix.org/postconf.5.html#sender_dependent_default_transport_maps
    
http://www.postfix.org/postconf.5.html#empty_address_default_transport_maps_lookup_key
    http://www.postfix.org/postconf.5.html#smtp_header_checks

Log inspection will reveal what envelope sender address sieve notices
are sent by.

However, dropping "Auto-Submitted:" headers rather risks mail loops
and need to be done with great care, if at all.  The OP needs to
be quite sure that he's not generating an email in response to email
that is a response to a previously generated email ...

So, in general don't do this.  In specific cases, only after careful
analysis of the resulting mail flow making sure that the Sieve rule
can never fire in response to any message that might come back as
a result of the generated and no longer manifestly "Auto-Submitted"
notice.

Read RFC 3834 with care.

-- 
        Viktor.

Reply via email to