On Fri, Mar 29, 2013 at 07:02:44AM -0400, Wietse Venema wrote:

> The alias_maps parameter is used ONLY for domains in mydestination.

The OP explicitly routes the address in question to the "local"
transport.  However, local(8) treats a queue-file recipient
address (one resolved to local(8) via the transport switch)
in the same way it treats in the same way it treats the same
address on the right side of an alias:

        somealias:      t...@example.com

so indeed if example.com does not match mydestination, the address
won't be subject to alias expansion, even though it resolves to
the local transport.  The solution is along the lines of:

        main.cf:
                indexed = ${default_database_type}:${config_directory}/
                virtual_alias_maps = ${indexed}virtual
                mydestination = local.invalid
                myorigin = example.com

        virtual:
                t...@example.com        test@local.invalid

with this only addresses explicitly rewritten to "local.invalid"
are delivered via the "local" transport and subjected to alias
expansion.  If you have recursive aliases in your aliases(5)
file, you need to be careful to avoid loops:

        # This loops:
        user:   user, bccuser

        # This delivers to user's local mailbox and to bccu...@example.com
        user: user@local.invalid, bccuser

-- 
        Viktor.

Reply via email to