Massimo Federico Bonfigli:
> As per the subject says, is there a way to save all email in transit
> through postfix, including the basic envelope info (in particular at least
> envelope sender and recipients)?
>
> I know I could use the pipe daemon to invoke a script and save these info,
> however that would be my delivery destination, it would affect the mail
> flow and I would be forced to reinject the email into postfix and I'm not
> sure if that would come without issues so I was hoping to find some way
> that would be less intrusive.
>
> What I thought it would be possible was to have two values in the transport
> maps, like:
>
> * smtp:, mypipe:
>
> To achieve email forking between transports, but this is not possible (I
> like to be an optimist at times)
>
> As far as I know the recommended way to save a copy of all emails is to use
> always_bcc but with that I lose the envelope data and I can't "replay"
> those emails reliably in case of some data loss event.
>
> Any suggestion?
/etc/postfix/main.cf:
recipient_bcc_maps = pcre:/etc/postfix/recipient_bcc.pcre
/etc/postfix/recipient_bcc.pcre:
(.+)@(+) $1%[email protected]
Wietse