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.

not sure if what I want is possible so I´d appreciate any pointers. I have full control over the infrastructure (DNS and servers)

Currently I receive mails for domain.tld. MX record for domain.tld is gw.domain.tld. gw then does some spam and virus checking and forwards the mails to the internal exchange server. GW is a Proxmox Mail Gateway Box (Free license)

Now what I want is to distribute mails for different recipients to other mail servers. Basicly I only want user1@domain.tld and user2@domain.tld to go to the exchange as before, but all others go to a different mail server (based on linux).

Any idea how I could achieve this?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

The easiest way to complete this would probably be to direct the MX record at the Linux server and have it forward the mail for the users in question onto the Exchange server. This can be done either using an .forward in the user's home, or in /etc/aliases if the user doesn't need to exist on the system.

For this to work, you need to have the Exchange server listening for an alternative domain, for example user@exchange.company.com or user@company.local.

There's other ways to do it was well, for example putting a smart smtp proxy server in front of both, but that will just add to the complexity.

share|improve this answer
    
Thanks for your fast response. I thought of that as well, but unfortunately changing the domain of the exchange is no option. So I guess the smart smtp proxy route would be the way to go. Any pointers where I could read up on that? –  André Jan 8 '11 at 12:14
    
Then it gets progressively more difficult to implement. For example, with Postfix, you could use transport_maps(postfix.org/postconf.5.html#transport_maps). So you could add "user@domain.com smtp:[$exchangeserverip]" for the users you want to forward to the Exchange server. If you're using Postfix already this can be done very simply. Other Linux mail servers probably have similar features, but Postfix is the one I'm most familiar with. –  Niall Donegan Jan 8 '11 at 12:32
    
sounds just like what I need, thanks :) –  André Jan 8 '11 at 12:56

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.