Matus UHLAR - fantomas:
If there's no way to do this now, I'll have to search for one.

On 24.05.22 09:43, Wietse Venema wrote:
There is a way to do this, and that involves using a Milter (or any
kind of content filter). Postfix does not implement every possible
edge case.

after some testing, It can be done this way

1. instance forwards the e-mail to new address (default unnamed postfix instance does that well)

passes mail to:

2.  instance that uses SRS to rewrite from: address if it's not local
    - postsrsd can to this
(uses canonical_maps that is used when receiving mail thus new instance)
passes mail to:

3.  instance that rewrites header From: to contenst of envelope from
    vrfydmn in fix (-f) mode supports this
    (milter is processed before canonical maps, thus 3rd instance)


milter that mime-encapsulates forwarded mail into new message could replace the third one
- I don't know such milter

Matus UHLAR - fantomas:
I probably should have said that there's no way to do this now using postfix
configuration, which was subject of my initial question.

Of course much can be done using milters, but without available milters
people need to build their owns, which is more work than just configuring
(another instance of) postfix.

as I understand it, if header rewriting is enabled, the canonical(5)
rewrites compiled-in list of headers:

On 25.05.22 12:03, Wietse Venema wrote:
You'll see an identical same list in Sendmail source code. Sendmail
uses different rulesets for sender and recipient address canonicalization.

On 25.05.22 19:33, Matus UHLAR - fantomas wrote:
similar although not the same, looks undocumented in both cases.


Just for evidence:

sendmail "from" headers (H_FROM):

"disposition-notification-to",
"errors-to",
"from",
"reply-to",
"resent-from",
"resent-reply-to",
"resent-sender",
"sender",

postfix "from" headers (HDR_OPT_SENDER):

"Disposition-Notification-To",
"Errors-To",
"From",
"Mail-Followup-To",
"Reply-To",
"Resent-From",
"Resent-Sender",
"Return-Path",
"Return-Receipt-To",
"Sender",

sendmail "to" headers (H_RCPT):

"apparently-to",
"bcc",
"cc",
"resent-bcc",
"resent-cc",
"resent-to",
"to",

postfix "to" headers (HDR_OPT_RECIP | HDR_OPT_XRECIP):

"Apparently-To",
"Bcc",
"Cc",
"Resent-Bcc",
"Resent-Cc",
"Resent-Reply-To",
"Resent-To",
"To",

I assume these are to be rewritten when canonical_classes includes header_sender or header_recipient.

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Windows found: (R)emove, (E)rase, (D)elete

Reply via email to