bug-mailfromd
Re: [Bug-mailfromd] srs (sender rewrite)
> On 25 Mar 2024, at 16:16, Marc <Marc@xxxxxxxxxxxxxxxxx> wrote:
>
>>
>>> 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 prefer to have it like this
> SRS0=HHH=TT=b.com=testing@xxxxx
> SRS0=HHH=TT=c.com=testing@xxxxx
Actually SRS says the envelope from of the forwarded mail should be SRS0=HHH=TT=random.com=random@xxxxx and if the original sender was an SRS address also then it should start with SRS1. https://en.wikipedia.org/wiki/Sender_Rewriting_Scheme
If the resulting address is longer than 64 characters Microsoft uses a different format like below. https://learn.microsoft.com/en-us/microsoft-365/troubleshoot/antispam/sender-rewriting-scheme
bounces+SRS=<Hash>=<Timestamp>@<Default Accepted Domain>
In the end SRS is a form of variable envelope return path (VERP) that adds a hash and timestamp, and without the formatted hash and timestamp you could just format it any way you like. The question is what to do if that mail bounces back. If you are willing to just discard it than it does not matter, if you want to process and somehow inform the forwarder or the original sender, than you need to check to make sure it's hash is correct and is not a fake address, etc.
--
Mehmet