On Sun, Nov 03, 2024 at 06:43:31PM +0100, Jaroslaw Rafa via Postfix-users wrote:

> Make sure that you DON'T list domain names included in "mydestination"
> parameter elsewhere, for example in virtual alias file.

This warrants some clarification:

    - The actual requirement is to not list the same domain in multiple
      "address classes".  So no membership overlap among:

        - mydestination             # "local" address class
        - virtual_alias_domains     # "virtual alias" address class
        - virtual_mailbox_domains   # "virtual mailbox" address class
        - relay_domains             # "relay" address class

    - So the above quoted advice is somewhat inaccurate.  However,
      Postfix 2.0 introduced a default backwards-compatibility setting
      with Postfix 1.0 and 1.1, that even some users who started with
      Postix later may be relying on:

        $ postconf -d virtual_alias_domains
        virtual_alias_domains = $virtual_alias_maps

      Therefore, with the above setting, (I generally recommend setting
      virtual_alias_domains explicity either empty or some separate list
      or table) don't list "bare" domains as keys in any tables used for
      "virtual_alias_maps", when this is also the set of tables
      defining "virtual_alias_domains".

      When virtual_alias_domains is its separate list, it is OK to
      list what look like "bare" domains as keys in
      "virtual_alias_maps", but they are then just localparts of
      email addresses from "local" domains (or $myorigin, or qualified
      with address literals in $proxy_interfaces).

      So if foo.example is a local domain, and foo.example is also a
      local email address you might have:
    
        main.cf:
            # Explicit either empty value, or in any case does not
            # include "foo.example" as a literal element or as a key
            # in a table element.
            #
            virtual_alias_domains = ...

            mydestination = foo.example, ...
            virtual_alias_maps = inline:{ {foo.example = postmaster} }

     and then there's no conflict, email to "foo.example@foo.example"
     will be delivered to the postmaster, as specified.

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to