Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a Postfix server. There are multiple alias databases, as defined in the alias_maps parameter:

alias_maps = hash:/etc/mail/aliases,hash:/data/mail/aliases,hash:/usr/local/mailman/data/aliases, nis:mail.aliases

Let's say that the string 'security' appears in /etc/mail/aliases and in /usr/local/mailman/data/aliases . 'security' is both an alias in /etc/mail/aliases (by default) and is a mailinglist in mailman.

What will Postfix do with email sent to 'security'? Will it consult /etc/mail/aliases before /usr/local/mailman/data/aliases? Does the order of the values in alias_maps matter?

share|improve this question
up vote 3 down vote accepted

Postfix will check the maps in the specified order until it finds the first match and deliver the mail to that recipient.

Excerpt from man 5 postconf

alias_maps (default: see "postconf -d" output)

The alias databases that are used for local(8) delivery. See aliases(5) for syntax details. Specify zero or more "type:name" lookup tables, separated by whitespace or comma. Tables will be searched in the specified order until a match is found. Note: these lookups are recursive.

share|improve this answer
Thanks. Do you know where this is specified in the Postfix manual? – Stefan Lasiewski Oct 8 '12 at 17:49
I don't know if this is explicitly stated anywhere in the documentation, but it's how Postfix handles these things. First match wins. – Ansgar Wiechers Oct 8 '12 at 18:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.