On 5/24/22 06:09, Matus UHLAR - fantomas wrote:
On 24.05.22 06:38, Wietse Venema wrote:
Hmm... I thought that SPF (and by implication SRS) are concerned
with ENVELOPE addresses?
originally, yes.
I have customer where incoming messages have the
"message was received from external source"
banned added.
The resulting messages don't have valid DKIM-signature: (or none at all), and
the only way to forward without problems is either to encapsulate them into
attachment or to rewrite From: to contain local domain and add DKIM-signature:
matching the domain.
I tried to use SRS for this, since there are existing tools that could be used
here. I just haven't expected other headers to be overwritten, just found out
now.
If you must rewrite an arbitrary subset of headers, then I recommend
that you use a Milter. There is Milter support for many programming
languages.
I would like only to rewrite the original From: since that one is used for DKIM
signatures. I haven't expected more headers to be rewritten.
If there's no way to do this now, I'll have to search for one.
Would Postfix "masquerade_domains" help here?
"Optional list of domains whose subdomain structure will be stripped off in email
addresses."