0

I'm building a virtual mail setup with Postfix, but I'm having issues with virtual_alias_maps. The documentation explicitly says its recursive, but I can't for the life of me get further than the first alias entry:

Addresses found in virtual alias maps are subjected to another iteration of virtual aliasing, but are not subjected to canonical mapping, in order to avoid loops.

Source: http://postfix.cs.utah.edu/ADDRESS_REWRITING_README.html#virtual

Simplified main.cf:

virtual_mailbox_domains            =   proxy:hash:$config_directory/maps/virtual_mailbox_domains.hash
virtual_mailbox_maps               =   proxy:hash:$config_directory/maps/virtual_mailbox_maps.hash
virtual_alias_domains              =   proxy:hash:$config_directory/maps/virtual_alias_domains.hash
virtual_alias_maps                 =   proxy:hash:$config_directory/maps/virtual_alias_maps.hash

virtual_mailbox_domains.hash:

mailboxdomain.tld ok

virtual_mailbox_maps.hash:

user@mailboxdomain.tld ok
otheruser@mailboxdomain.tld ok

virtual_alias_domains.hash:

fancydomain.tld ok

virtual_alias_maps.hash:

# User with mailbox
user@fancydomain.tld user@mailboxdomain.tld

# User with mailbox, but through intermediate alias
otheruser@fancydomain.tld intermediate@fancydomain.tld
intermediate@fancydomain.tld otheruser@mailboxdomain.tld

# New guy without a mailbox yet
newguy@fancydomain.tld newguy@mailboxdomain.tld

I'm connecting to port 25 and trying RCPT TO: <address> for the above aliases. All of the addresses are accepted, but only resolves to the immediate alias, meaning mail to otheruser@fancydomain.tld will be attempted delivered to intermediate@fancydomain.tld and not the final destination mailbox. newguy@fancydomain.tld is also accepted, because it has an alias - but since there is no mailbox called newguy@mailboxdomain.tld, this also fails on LMTP delivery.

Am I missing something here?

Postfix version is 3.4.9. Mailbox delivery is through LMTP to Dovecot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.