> On Oct 29, 2018, at 10:59 AM, kousou+post...@aueb.gr wrote:
> 
> Yet, with all respect, I do believe that you should reconsider the issue so
> that no such 'tricks' would be necessary and hence the deployment and
> administration of the system would be more straightforward.

Unfortunately, the tricks are a necessary architectural consequence of:

  * Sendmail-compatible aliases files
  * Performance, i.e. parallel delivery of distinct local recipients

Therefore, this part of the design won't change.  If users read the
documentation, we could perhaps find a few more places to encourage
them to avoid aliases(5) and use virtual(5) for all rewriting that
maps addresses to other addresses.  The aliases(5) file should ONLY
be used for:

        * addresses that expand to pipes
        * addresses that expand to ":include:" lists
        * addresses with an "owner-" alias.

Furthermore, to reduce unintentional deliveries to the legacy
local(8) mailer, all bare addresses ("user" rather "u...@example.com")
should qualify via "$myorigin" to a virtual alias domain, that does
all the requisite rewriting, and only final addresses that rewrite
into a non-default local domain "@localhost.$mydomain" or "@$myhostname"
should go to the local mailer.

That is:

   main.cf:

        # Uncomment zero or more, fewer generally better
        mydestination =
                # $myhostname
                # localhost.$mydomain
                # localhost.invalid
                # localhost.local

        # Make sure this is not listed in $mydestination
        myorigin = $mydomain
        virtual_alias_domains = $myorigin

        # Explicit rewrites for all local(8) deliveries:
        indexed = ${default_database_type}:${config_directory}/
        virtual_alias_maps = ${indexed}virtual

        # Local aliases for just pipes, include files, ...
        alias_database = ${indexed}aliases
        alias_maps = $alias_database
        
        # Automatically qualify "localhost" (revert Postfix 3.0 default)
        append_dot_mydomain = yes

   virtual:
        # Joe has a local(8) mailbox, and may have a .forward file, ...
        j...@example.com                joe@localhost

        # mypipe expands to "|command" running as ${default_privs} (nobody)
        #
        myp...@example.com      mypipe@localhost

        # mylist has an owner-alias, and expands via a ":include:" path
        #
        myl...@example.com      mylist@localhost

-- 
-- 
        Viktor.

Reply via email to