Sender rewriting for subdomains

Hi there,

If I route email received (e.g. from [email protected]) to an address of a subdomain (e.g. [email protected]) using a custom address configured with an action to send to a destination address (e.g. [email protected]), the sender rewriting scheme (SRS) in Email Routing follows:

[email protected]

rather than:

[email protected]

i.e. I would expect the subdomain to be included in the domain part of the rewritten MAIL FROM, if it is included in the original RCPT TO.

The consequence of this is that SPF will fail, if include:_spf.mx.cloudflare.net isn’t included in the SPF record at the domain level, albeit DMARC should still pass, since DKIM should. This renders the SPF record at the subdomain level inert, in this particular scenario. Perhaps not a major problem in practice (aside from additional noise in failure reports, depending on your DMARC configuration), but I believe it supports my expectation that it should be sent from the original RCPT TO domain.

The real issue I am experiencing, as a result of the current SRS, is that I do not appear to be able to set the destination to be an address of the domain (e.g. [email protected]), where the mail server for the domain is managed elsewhere, as the mail server (exim, in this case) which manages example.org rejects the rewritten MAIL FROM with the message Sender verify failed.

As such, I’d like to suggest a modification to the SRS adopted by Email Routing to account for the original RCPT TO domain.

Much appreciated,
Phil