On 5/7/2016 7:31 AM, Wietse Venema wrote:
> deoren:
>> 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.
> 
> Postfix can do it with an external content filter.
> 
> Postfix can do it with header_checks in the SMTP/LMTP client.  You
> can use transport_maps to direct a specific recipient to a specific
> smtp (or lmtp) client instance in master.cf with its own
> smtp_header_checks (or lmtp_header_checks) in master.cf.
> 
>       Wietse

Thanks for the response and the suggestions. I had another task on my
TODO list that required adding a header based on final recipient; using
a transport map worked great for that task. In particular I could see
the log entries show that the new transport was being used as expected.

I tried a similar approach here and haven't had any luck yet. It's like
none of the recipient virtual aliases that I've listed on the lhs are
matching. Has virtual alias resolution already completed leaving me with
the final recipient? Is that the value I have to use on the lhs?


In master.cf, I added this since the final delivery is via LMTP:

strip-automated-headers unix  -       -       -       -       -       lmtp
  -o syslog_name=postfix/strip-automated-headers
  -o
lmtp_header_checks=regexp:/etc/postfix/strip_automated_headers.conf,regexp:/etc/postfix/header_checks.conf

which is a copy/paste of the existing lmtp transport with a new name and
two passed options (should be seen as three lines with leading spaces
for the options).

When I didn't get any activity in the mail log for that transport I
tried it like so just to be complete:

strip-automated-headers unix  -       -       -       -       -       smtp
  -o syslog_name=postfix/strip-automated-headers
  -o
smtp_header_checks=regexp:/etc/postfix/strip_automated_headers.conf,regexp:/etc/postfix/header_checks.conf

Anything obviously wrong with what I've tried?

Thanks.

Reply via email to