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 a mail server for a domain foo.com. Currently all users’ mail box is also in the same server. Now my office is starting its operation in multiple Countries. How can I have mailbox store of the users in one country to be stored locally in a server in that country office server. My current setup is a combination of Postfix + Courier IMAP + MySQL + Amavisd-new + SpamAssassin + ClamAV + SASL . Basically what I need is user A's mails should go to the server in Country A and user B's mails should go to the server in Country B. If my question is not clear enough I am open to questions. One main thing here is the domain name should be the same for all users. I cannot have an id like mymail@us.mycompany.com or mymail@uk.mycompany.com

share|improve this question

migrated from stackoverflow.com Jan 29 '10 at 12:01

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 3 down vote accepted

Use postfix transport maps.

e.g. in main.cf

transport_maps = /etc/postfix/transport

in /etc/postfix/transport:

user1   smtp:uk-mailserver.example.com
user2   smtp:uk-mailserver.example.com

The run postmap /etc/postfix/transport ; postfix reload

That will deliver email for user1 and user2 to uk-mailserver.example.com

If you don't specify anything in the transport map, the default transport (which is usually deliver locally) will be used. You'll also need to make sure both sets of users are accepted as valid recipients on this machine (usually by making sure they have accounts)

It's also a good idea to split mail routing out from your mailbox server and do routing/spam/virus etc filtering on frontend MX machines.

share|improve this answer
    
+1 for short thorough answer. –  Patrick R Jan 29 '10 at 14:57

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.