Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 address@support.example.com and then I have just normal e-mail addresses like address@example.com

All is good so far, except if I want two alias which have the same user parts but diffent domain, like tech@support.example.com and tech@example.com 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 *@support.example.com 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

4 Answers 4

up vote 7 down vote accepted

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

tech@support.domain.com     person1@example.com
tech@domain.com             person2@example.com
@support.domain.com         person3@example.com

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

share|improve this answer
1  
...and reload postfix –  Rowland Shaw Jul 8 '09 at 15:37
    
Please mention what has to be added in /etc/postfix/main.cf. –  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 main.cf 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, domain.com, support.domain.com –  Trausti Thor Jul 9 '09 at 9:05

Edit :$config_directory/virtual:

tech@support.domain.com        user1@domain.com
tech@domain.com                user2@domain.com
@support.domain.com            user3@domain.com

YMMV.

share|improve this answer

You might want to have a look at Virtualmin (www.virtualmin.org).

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

 
discard

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.