3

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.

4 Answers 4

7

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.

4
  • 1
    ...and reload postfix Jul 8, 2009 at 15:37
  • Please mention what has to be added in /etc/postfix/main.cf. Jul 9, 2009 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, 2009 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 Jul 9, 2009 at 9:05
2

Edit :$config_directory/virtual:

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

YMMV.

0

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.

0

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.

2
  • 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, 2009 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, 2009 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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