one domain, two different email MTA's (servers)

here is the scenario:
tow companies are merging:  abc.com and xyz.com
A new domain is being created: 123.com
company "abc" has 250 users on Exchange 2003
company "xyz" has 2800 users on qmail server

The company does not want to deal with exchange liscences for 3000 users, so they want one domain with two different email servers.
The new domain "123" will be used for all users in the new company, so they want the following:
123.com mail goes to barracuda spam & virus filter
But then we have a problem, two mail servers behind it, sharing the same domain name...  So basically you have mail account "shawn@123" that is on the exchange server, and you have "bill@123" who is on the qmail server.
How do I route or forward which email belongs to whisch server?  one server I am just fine, but two on the same domain I haven't attempted before.

Thanks!
MBNDAsked:
Who is Participating?
 
Pat PribelSenior - Systems EngineerCommented:
There are a couple ways to do this in Exchange. I also am not familiar enough with qmail to know it if would do the same or do it better.
Take a look at this article, it goes into a couple different ways of accomplishing this. We had to do something similar and created the new Recipient policies that allowed us to the define the shared email namespace as non-authoritative. Once defined as non authoritative exchange will route the email externally if the address doesn't exist in it's active directory. Read this article though because it has a simpler scenario of just pointing any non-resolved addresses to a specific host (in your case you can point it to the qmail server).
 http://www.msexchange.org/tutorials/Exchange-2003-SMTP-Namespace-Sharing.html
Thanks
Pat
0
 
hodgeyohnCommented:
it will be a little odd, but i believe i did this once.

exchange :  user@abc.com, make a custom recipient for the other users so that they have two email addresses, one user@abc.com, and one with user@abc.abc.com, use this to foreword to the qmail system.

i do not know qmail well enough to say how to control the reply address but this should work.

0
 
Daniel McAllisterPresident, IT4SOHO, LLCCommented:
This is MUCH easier in QMail -- not because of QMail's superiority (which is there, it's just not the reason why it is so much easler), but because there are only 250 users on the Exchange server -- so there are many MANY fewer "edits" that have to be made.

Here's what you want to do (re-worded from your original post)...
 - you have 250 users at abc.com that currently use Exchange 2003. Their e-mail addresses will be converted to 123.com.
 - you have 2800 users at xyz.com that currently use QMail. Their e-mail addresses will also be converted to 123.com.
 - Both QMail and Exchange sit behind the same firewall on the same public IP address.

First of all, for the benefit of everyone on the outside that doesn't get the message that abc.com & xyz.com are becoming 123.com, LEAVE the existing email accounts alone, but change the MX records on the DNS servers to point to the PUBLIC IP address of the QMail server. Also, add abc.com to the Qmail rcpthosts file, and make the entry below in the smtproutes file, where 192.168.0.111 is the LAN address of the Excahnge server:
abc.com:192.168.0.111
Lastly, make sure that the Exchange server "whitelists" mail from the LAN address of the QMail server. (NOTE: You CAN use public IP addresses, but if they're co-located, LAN traffic will be MUCH faster & safer.)

OK... so now abc.com & xyz.com both go to the Qmail server, and abc.com gets forwarded to Exchange 2003 (but xyz does not).

So next, we create the 123.com entries.
 1) First, add the extra SMTP entry for each of your 250 users on the Exchange 2003 server (have fun!)
 2) Next, you'll want the QMail server (& Exchange, probably) to default (advertise) as 123.com, so make the appropriate changes in /var/qmail/control and on Exchange
 3) Then, setup the xyz users to be able to send & receive as both xyz and 123. You haven't said how the QMail is setup, so I'll show you in the 2 most common ways:
   A) If you're using system users:
      - Just add xyz.com back to your locals file (you SHOULD have changed it in step 2 above!)... THAT'S IT! Since the usernames (the part of the email address BEFORE the @) didn't change, both domains (xyz & 123) will map users to the same place
   B) Iif you're using a user manager (like vpopmail or vmailmgr):
      - In this case your users won't so easily be switched to the 123.com domain. The user manager has stored all of the user accounts separately... but you CAN create an ALIAS domain that will just remap one domain over the other:
      - In the case of vpopmail, go to the folder /home/vpopmail/bin and run the command:
          vaddaliasdomain xyz.com 123.com
      - follow your normal route for adding users, but for each user create a forward to the exchange server. (Do this in the .qmail file for each user).
 4) Finally, setup the abc users on the Qmail system. Follow your normal route for adding users, but for each user create a forward to the exchange server. (Do this in the .qmail file for each user, or in the usermanager configuration).

That's it! Now all incoming mail for abc.com, xyz.com, & 123.com arrives at the QMail server. Messages for former xyz.com users can be addressed as either USER@xyz.com OR USER@123.com, and they go to the same place. Messages for the former abc.com users are processed a little differently:
 - USER@abc.com is sent directly to the Exchange server
 - USER@123.com is processed by QMail, and based on the USER settings, is forwarded to Exchange

As a last comment -- at first glance, we wouldn't need to worry about outbound delivery. Both the QMail & Exchange server could open port 25 sessions with other MTA's simultaneously and be validated with the same SPF or other criteria (perhaps, excepting DomainKeys). HOWEVER, that poses a problem for when users want to send messages to each other... the issue isn't so much for the QMail server (which now has the extra 250 accounts, and knows how to deal with them), but with the Exchange server (which DOESN'T know about the extra 2800 former xyz accounts. As a result, I recommend having ALL outbound mail process through the QMail server (unless you WANT to configure Exchange to have 2800 more users!)

I hope this helps.... GOOD LUCK!

Dan
IT4SOHO
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
MBNDAuthor Commented:
it4soho, thank you for the very detailed info.  I will take that with me to the guys I have helping us on the mail servers, we found a company that specializes in qmail, and your description, sounds familiar.

I appreciate everyones responses so far.
Thank you, and I will let you guys know which way we go.
Thanks again!
Shawn
0
 
hodgeyohnCommented:
mbdn,  are there any other questions you needed help with?  if not please close this question.

thanks
0
 
MBNDAuthor Commented:
Thank you for the info, the rest of my server infrastructure wont be here for a couple weeks, so then I can set up a couple test boxes to figure out what is going to work best.
Thanks again for the excellent ideas!
0
 
Pat PribelSenior - Systems EngineerCommented:
If you decide to go the route of letting exchange do the relaying and you have some more questions just let me know.
Thanks
Pat
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.