Postfix is ignoring the virtual maps

Cod1ngFree asked:

I am using Postfix and when I try to send an email to a virtual address ([email protected]), it is not able to find the user:

Aug  7 11:55:32 example postfix/local[24435]: AE54C808E546: to=<[email protected]>, relay=local, delay=6.6, delays=4.8/0.47/0/1.4, dsn=5.1.1, status=bounced (unknown user: "paradise")

I am using the following virtual map:

[email protected] horus horus

Where horus is my (non-root) Unix user. If I try to verify the virtual addres by doing:

postmap -q [email protected] hash:/etc/postfix/virtual

It returns my current user:


Because of that, I am not sure why is not able to find [email protected] or paradise.

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 2
mydestination =,localhost
myhostname =
mynetworks = [::ffff:]/104 [::1]/128
myorigin =
readme_directory = no
receive_override_options = no_address_mappings
recipient_delimiter = +
relayhost =
virtual_alias_maps = hash:/etc/postfix/virtual

And my /etc/aliases (but as far as I know, it is used only for local delivery) is:

www:            webmaster
webmaster:      root
noc:            root
security:       root
hostmaster:     root
info:           postmaster
marketing:      postmaster
sales:          postmaster
support:        postmaster

# trap decode to catch security attacks
decode:         root

# Person who should get root's mail
root:           horus

The database seems to be okay:

db_dump /etc/postfix/virtual.db -p

[email protected]\00

What is wrong with the configuration?

My answer:

If you want to use virtual_alias_maps to deliver mail, you must also tell Postfix which domains it should consult the map for, with the virtual_alias_domains directive. This can be a plain list of domains, or it can also be one of the map types Postfix supports.

virtual_alias_domains =

will get you going, and you can put in a map or whatever you want later.

See also the Postfix documentation on virtual hosting.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.