What I am trying to do is create a ‘reverse alias’ (next to an alias). The 
alias must be used when mail is sent to a specific domain.

> On 1 Feb 2021, at 17:59, Gerben Wierda <gerben.wie...@rna.nl> wrote:
> 
> master.cf gets:
> 
> mycanon      unix  -       -       y       -       -       smtp
>      -o smtp_generic_maps=$mycanon_generic_maps
> smtp      unix  -       -       y       -       -       smtp
> 
> /opt/local/etc/postfix/transport gets an extra line:
> 
> example.com                      mycanon:
> 
> main.cf gets:
>       mycanon_generic_maps = inline:{ { @mydomain.net = myal...@mydomain.net 
> } }


Now, I’ve tried this for a couple of receiving domains

in transport:

gmail.com    mycanon:
myn...@icloud.com    mycanon:

Both gmail and icloud receive mail from myal...@mydomain.net 
<mailto:myal...@mydomain.net>, so it seems to work. However, with an Office 365 
hosted domain, something goes wrong

transport:

someoffi365domain.com mycanon:

delivers a message without a changed sender

transport:

specificu...@someoffi365domain.com mycanon:

does not deliver at all to the final destination, but it is successfully 
delivered to the MTA from outlook.com (then disappears).

What I suspect here is that DKIM is the problem. As trivial-rewrite changes the 
message, the DKIM signature is no longer valid. @gmail.com reports the fail 
(spf is OK) but delivers anyway. Office365 is more strict it seems.

So it works, but it breaks DKIM, because DKIM happens before the rewrite?

So, suppose I want to do a sender rewrite that survives the DKIM generation? 
(I’m using rspamd for that). Probably solve this in Rspamd, right?

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R&A Enterprise Architecture <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

Reply via email to