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

I have setup postfix and everything works. But I would like one thing. I have a service ticket system, that should accept ALL e-mail coming in on and then I have just normal e-mail addresses like

All is good so far, except if I want two alias which have the same user parts but diffent domain, like and I want these two to go to 2 different persons. How do I do that ? And as a bonus question, how do I make sure that all addresses that come in to * end up in the same user?

I might add more domains to the server, so at least the first question is a must.

share|improve this question
up vote 7 down vote accepted

Use the virtual alias table, which is probably /etc/postfix/virtual   

Once you've modified this file, don't forget to run postmap /etc/postfix/virtual.

share|improve this answer
...and reload postfix – Rowland Shaw Jul 8 '09 at 15:37
Please mention what has to be added in /etc/postfix/ – Caterpillar Jul 9 '09 at 4:03
Postfix reload isn't needed, it will notice the change "soon". You can reload it if you're impatient :) – Bill Weiss Jul 9 '09 at 4:32
What needs to be added in the file is the following "virtual_maps = hash:/etc/postfix/virtual" and of course you need to set the relay domains in "mydestination = $myhostname, localhost.$mydomain,, – Trausti Thor Jul 9 '09 at 9:05

Edit :$config_directory/virtual:        


share|improve this answer

You might want to have a look at Virtualmin (

It's a module for webmin that makes hosting multiple email domains dead-easy (however, it may take some time to configure how you like it). Once in place it is very intuitive, and helps when you have to do something unusual, like send an address to multiple recipients, or set up an autoresponder.

We use it to host some 200 email domains - mostly for adding and removing aliases - but there is also a handy usermin module that adds some user-level features like autoresponders and a simple webmail client to pop3 mailboxes.

share|improve this answer

Your problem should be easy to solve if you go through Postfix documentation about address rewriting and pick parts which are applicable to your problem.

Exact configuration will depend on other options in your postfix configuration, so I really cannot be more explicit.

share|improve this answer
Wow, err, pointing to the documentation as an answer is not really helpful is it. I am not a Postfix buff, but I can imagine you could have at least pointed him in the right direction, right? – wzzrd Jul 8 '09 at 15:13
I don't know. It took me more time to find exact page on postfix site and link to than to read it up to point where I had to ask few more details to craft exact answer, so I thought it might be useful as exact pointer to upstream documentation. – dpavlin Jul 21 '09 at 20:17

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.