For many years, I've used Postfix's ability to automatically BCC mail
that is being sent through it to generate an archive of sent mail.
Unfortunately, the 'use bcc_senders_maps to have a file with a list of
accounts to do this to' method no longer works if you have to have SRS
enabled and your outgoing emails appear to come from one domain, that
of the server, to avoid having to set up DKIM and SPF dozens and
dozens of times.
Before:
The 'received from' and the 'return path' headers were both the domain
that was the 'from' domain.
After:
The 'received from' details are stripped and replaced by something like
Received: from [127.0.0.1] (localhost/[127.0.0.1])
by (server) (Postfix) with ESMTPSA id 514CD810AC
SRS makes the return path
Return-Path: <SRS0=qeUa65BM=5O=('from' domain)=('from'
sender)(a)srs.(server)>
Something in that breaks the bcc_senders_maps functionality. Before I
could automatically archive outgoing email from some domains and not
others, and treat each individually, but now iit appears to be all or
nothing, and every senders domain is the same: srs.(server).
What other ways are there of getting an automatic bcc of a subset of
everything sent through the server? One thought is to make the
receiving address filter it - mail from A gets sent on to its real
archive, mail from B gets sent on to its real archive, mail from C and
D gets deleted - but that's a bodge.
Ian