1

I've got Postfix managing two different domains one.com and two.com, included in the my destination variable of the main.cf file.

I need an /etc/aliases file including something like this:

user@one.com: foo@three.com
user@two.com: bar@four.com

Since /etc/aliases syntax does not allow me to do this, how can I solve?

auino
  • 143
  • 7

1 Answers1

2

You can use the virtual_alias_maps like so:

virtual_alias_maps  = hash:/etc/postfix/virtualalias

with content like this:

user@one.com foo@three.com
user@two.com bar@four.com

Of course, postfix needs to know how to handle the addresses. After that, don't forget to postmap /etc/postfix/virtualalias and to reload Postfix.

Read http://www.postfix.org/VIRTUAL_README.html

Sven
  • 98,649
  • 14
  • 180
  • 226