bug-mailfromd
Re: [Bug-mailfromd] srs (sender rewrite)
>
> > Do you have any experience implementing srs (sender rewrites)
>
> Personally I have never tried it, but I don't see any difficutlies
> in doing so.
>
I am getting quite a few bounces from users that enable forwarding via webmail. I think this will only get worse.
I have been discussing this a bit with sendmail and I think that doing srs rewriting based on this local delivery map is good. But milters do not have access to this(?) So you either need to configure something like an external database file that mimics the function of the local delivery map. But that would require constant updating if you use a new domain.
As an alternative you could use ip networks that identify local delivery. That would require less modifications. But I am not sure how you could acquire the delivery ip from sendmail so you can eg. match it against an arary of ip networks. Maybe there is a macro available that indicates a destination?
I think a lot of srs rewriting is done based on writing an envelope with the domain of the operator
so if you have a messages:
from random@xxxxxxxxxx to testing@xxxxx (me) that is forwarded externally to testing@xxxxxxxxxxxx.
from random@xxxxxxxxxx to testing@xxxxx (me) that is forwarded externally to testing@xxxxxxxxxxxx.
from random@xxxxxxxxxx to testing@xxxxx (me) that is forwarded externally to testing@xxxxxxxxxxxx.
I think default srs rewrinting is mostly like this ( I am not to sure about what is before the @, but after the @ is most important for spf checking)
SRS0=HHH=TT=b.com=testing@xxxxxx
SRS0=HHH=TT=c.com=testing@xxxxxx
I prefer to have it like this
SRS0=HHH=TT=b.com=testing@xxxxx
SRS0=HHH=TT=c.com=testing@xxxxx
I don't really care if the original sender random@xxxxxxxxxx is visible here. I think for logging purposes it would be better.
I have put link to the source of a perl module[1], looks like quite simple string manipulations. Deciding on when to apply srs is still a bit vague for me. I would like to apply this only when it is stricktly necessary (eg. if senders has spf -all (I have already variable in mf that records this))
I would already be helped if these outgoing messages could be rewritten so they are delivered. Incoming srs bounces can come later. ;)
Best,
Marc
[1]
https://metacpan.org/dist/Mail-SRS/source/lib/Mail/SRS.pm