Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Can you run postfix with two different types of alias files at the same time?

From: Viktor Dukhovni (postfix-usersdukhovni.org)
Date: Sat Apr 19 2014 - 11:39:23 CDT

On Sat, Apr 19, 2014 at 09:58:10AM -0500, Jamie Lagarde wrote:

> I need to apply a regex rule to inbound mail to route some of the mail
> to a different local mailbox. I need to do this while still
> maintaining the existing "standard" /etc/aliases file. I can't seem
> to get postfix to use both alias files. Is this even possible?

Yes it is possible.

> In main.cf I have it currently setup like this and it doesn't work.
> alias_maps = regexp:/etc/postfix/aliases
> alias_database = hash:/etc/aliases

The correct syntax is:

    alias_database = hash:/etc/aliases
    alias_maps = regexp:/etc/postfix/aliases, ${alias_database}

The "alias_database" parameter specifies which tables are rebuilt
by the newaliases (aka sendmail -bi) command. The "alias_maps"
command specifies which tables are used in lookups.