Matus UHLAR - fantomas:
> >> > On 21.04.22 17:51, Matus UHLAR - fantomas wrote:
> >> > >I'm trying to implement SRS using postsrsd. Since it always rewrites
> >> > >non-local sender (even for incoming mail) I'm trying to restrict it
> >> > >only for outgoing mail.
> 
> >Wietse Venema:
> >> SRS sender rewriting is in scope for email that is forwarded from
> >> elesewhere to elsewhere through virtual aliasing etc., or for email
> >> that is delivered locallly AND FORWARDED through ~/.forward files,
> >> or delivery to "|command".

And not in scope is forwarding between different-preference MX
hosts. Also, email can have both internal and external recipients,
therefore per-message sender rewriting is incorrect because messages
have recipients with different kinds of SRS scope.

> On 28.04.22 10:50, Wietse Venema wrote:
> >This delivers remotely with a remote envelope sender.
> 
> yes, this is what SRS is for: forwards.
> 
> The problem comes from postsrs being called in *_canonical_maps, which are 

I don't think you can do what I describe with a single Postfix MTA,
because there is no "smtp_generic_classes = envelope_sender" or
"smtp_sender_generic_maps" support. If someone can figure out if
that would solve the problem, then it could be implemented.

I think it can be done today with two MTAs: one external (internet
facing) and one internal (hidden behind external MTA).

- Un-SRSify envelope senders on the way from the external MTA to
the internal MTA (internal MTA has dedicated SMTP listener + cleanup
+ envelope sender canonical mapping).

- SRSify remote envelope senders on the way from the internal MTA
to the external one (external MTA has dedicated SMTP listener +
cleanup + envelope sender canonical mapping).

        Wietse

Reply via email to