> > What I'm trying to achieve is for Postfix to deliver a copy to a local
> IMAP
> > account, and then remove our internal/private headers before passing the
> > mail on to the relay host. The idea is for some custom software to read
> the
> > copy from the IMAP account, using the interal/private headers for
> > integration with other systems.
>
>

> Use smtp_header_checks=pcre:/path/to/file to remove the headers
> from outbound mail. If you also use LMTP or SMTP to deliver local
> IMAP accounts, one extra step is needed. I'm not going to complicate
> the solution if this step is not needed.
>
>        Wietse
>

Yes, I'm using LMTP for delivering the bcc copy to an IMAP account, so
please tell me about the extra step. :)

>From main.cf:

always_bcc=myaccount
mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
relayhost=[smtp.sendgrid.net]:587

Mail sent to custo...@example.com via Postfix should be copied to the
"myaccount" IMAP account with all it's original headers, but I want to
remove the "X-Cusomer-ID" (and possible some others) from the mail when
it's delivered to the external relayhost.



-- 
Lars Preben Sørsdahl
lars.preben.no

Reply via email to