Need to distribute email to 2 servers, maybe using MX records or Transfer Table?

I want to have email distributed based on the email account, so would go to one server, and would go to a different server.  I don't want to do forwarding at the server, I'd like to have it done with MX records or I've read something about Transfer Table, but I'm not sure.  Also, if I had 2 MX records for the same domain, and the email reaches the first server but an account doesn't exist, will it try the second MX record?  Thanks!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

It sounds like you want to do server peering within a domain. How you do that depends on what email server you are using. Most commercial servers (Exchange, IMail, etc) provide a way to do this, you just need to read the documents carefully, but it usually isn't hard. Some open source servers are a little more involved in how you set it up, but it still usually isn't hard.

What kind of serves are you running now?
clarkie6Author Commented:
Merak IceWarp.
Here's the whole speil, our sister company and us are sharing a web site, and we don't want the mail to be available on the others server, also, they use exchange we don't.  So I wanted to see if the MX records could take care of this.  What I hope would happen is that when it tries the primary mx, it would get an undeliverable response because no account exists, and try the senondary.
As far as I can recall, if the email client gets an undeliverable response because user does not exist on that domain (which is what the server would give), the client or delivering server will just stop trying to deliver it and give the sender the error. Most email servers will generate the error as a fatal undeliverable error, so the sending server will bounce it back to the sender saying it cannot be delivered. So the short answer is no, the MX records themselves won't take care of it.

Generally, peering works by the server accepting ALL incoming mail for a domain, even if the user is not local (mailbox is not on that server), and then forwarding any non-local account to another server, where it expects the account to be. The email is never stored on the server that doesn't have the account, except for the time in the message queue. This, I think, would be the reliable solution. MX records would list both servers, and mail is sent between them as needed. No manual forwarding, the servers should do it automatically. This also provides redundancy, in that if one site is down, the other can still accept all incoming mail, and send over the mail when that site is back up.

My skillz on Exchange are limited, and I haven't used Merak myself, so if anybody else looks in here, maybe someone could provide the steps? Otherwise, you may consider opening another question for that one.
I think you're making things too complicated you can do what you intend, but it's better to have one or both servers accept mail and they will deliver the mail to the other server.  If the only reason you don't want forwarding is that you don't want to add users to your server from the other server or them to need to your users to their server then that's a bit silly.

Actually, thinking about it I like your idea more... I don't want to accept spam or a message that will be rejected by the other server...  nope, still not so good an idea.

(1) But to do what you want, you would need to write an event sink for the Exchange server to 45x any unknown recipients so later the foreign server might try your merak server (a little tough).  You would similarly also create a content filter on your server to again to 45x any unknown recipients in the domain (easy).  You would give each server an MX with the same priority and hope for the best.  This solution is not so good and is frought with ambiguity as you don't know how often foreign servers will switchup and try one server or the other, you might have mail delayed for hours.... because it is just pure luck and you can flip a coin and get heads 10 times in a row -- 3 heads might amount to a 45 minute delay, 5 maybe 2 hours.... and there may even undeliverable mail problems.

(2) Otherwise, a more sensible way you could configure Merak to have the exchange as a "domain alias or backup domain (same)" (no verifying) and they would forward any mail your server didn't have a box for to the exchange and exchange which normally accepts all mail for a domain regardless would be configured "forward all mail with unresolved recipient" to your Merak server.  Each of your servers would again have the same MX preference and they would both accept mail all mail forwarding unknown mail to the other server -- but Unknown users might loop for a while.

(3) To save some money and standardize things, I would lock down the exchange server, configure it to 550 any unknown users using a regedit (don't remember off hand), and for the merak server configure exchange as a "backup domain" using verification with RCPT TO against users on the exchange.  Now we could configure all the antispam and antivirus once on the merak server and split those lesser costs (better than getting two antispam/antivirus solutions, one for each server).  The merak server would be the one MX record and accept all mail for the domain forwarding mail to the exchange and rejecting all other mail without accepting it on faith and without bouncing it around.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.