> On Sep 18, 2017, at 12:59 PM, Andreas Thienemann <andr...@bawue.net> wrote:
> 
>> * ONLY domains that contain no real recipients to be
>> handed off to some transport for delivery may be
>> listed in virtual_alias_domains.
> 
> So just to confirm: virtual_alias_maps is also consulted for a match for
> addresses _not_ listed in virtual_alias_domains?

Virtual alias rewriting applies to *all* recipients, regardless of address
class.

>> Therefore you can have in virtual_alias_maps:
>> 
>>      # The dreaded catchall applies to all mailboxes that
>>       # are not explicitly mapped to themselves or out of the
>>      # domain
>>      @real.example.com       catc...@local.example.com
>>      j...@real.example.com   j...@real.example.com
> 
> What does the mapping of the mailbox to itself do? I had not seen
> that before in the docs.

It avoids hitting the catch-all for that address.  More specific
lookup keys preƫmpt less-specific lookup keys, but keep in mind
that rewriting is recursive and stops only when:

   * A lookup key maps to itself, OR
   * A lookup key is not found, Or
   * The recursion limit is reached

Otherwise, the RHS of a lookup becomes the LHS of the next lookup
up to the recursion limit.

>> and then in transport_maps:
>> 
>>      j...@real.example.com   uucp
>> 
>> or, conversely
>> 
>>      real.example.com        uucp
>> 
>> If the majority of users that stay in @real.example.comm use that
>> transport.
> 
> During my testing the transport_maps entry seemed to not have been
> consulted, but then again I also did not have the j...@real.example.com
> mapping back to itself. Is that entry needed in such a form?

Transport selection happens downstream of virtual alias rewriting.
If the address rewrites to something else, transport lookup is
based on the final output of virtual alias rewriting.

-- 
        Viktor.

Reply via email to