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/>

> On 28 Jan 2021, at 17:53, Viktor Dukhovni <postfix-us...@dukhovni.org> wrote:
> 
> On Thu, Jan 28, 2021 at 04:51:13PM +0100, Gerben Wierda wrote:
> 
>> I have an alias that I use for a certain external web site. Mail sent
>> to that alias ends up in my mailbox.
>> 
>> Is it possible in some way to have — for mail sent to that domain only
>> — to have a canonical rewrite of the from/sender address?
> 
> Yes, at the cost of a dedicated transport whose master.cf entry contains
> an override for smtp_generic_maps:
> 
>    master.cf:
>        mycanon unix ... smtp
>            -o smtp_generic_maps=$mycanon_generic_maps
> 
>    main.cf:
>        transport_maps = inline:{ {example.com = mycanon:} }
>        mycanon_generic_maps = inline:{ { @$myorigin = myal...@mydomain.net } }

Sorry for my dimness (not doing this daily) but do I understand this correctly 
as:

- Message is deliverd to normal transport (smtp process A) first
- transport_maps in main.cf says: “when recipient is example.com 
<http://example.com/>, use transport mycanon)
- Message is delived to mycanon transport (smtp process B) from normal 
transport (smtp process A)
- mycanon transport replaces myorigin with the alias

Correct?

G

Reply via email to