Will having 2 MX records pointing to different mail server types cause delivery issues?

I've inherited a setup where the mail server is exchange 2010.

For some reason, I'm not sure why there is 2 MX records setup. One being the exchange server which is the higher priority while the external (non-exchange) server is the secondary mx record. I don't believe this was done for redundancy reasons as the other mail server is not set to route mail back to the exchange server (it's just the webhosts email for their hosting)

The client has been experiencing disappearing email, however after my investigations its not actually disappearing, but exchange is successfully receiving the mail and then passing it on to the external server. It isn't happening all the time, just with some email messages from some domains.

My question:

Is exchange passing the mail on because it can see the secondary MX record and is configured (somewhere) to send mail out?

If so, how do I stop it? Is it as easy as just removing the second MX record pointing to the external mail server and exchange will stop passing mail on?

I'm not exchange expert so I'm kinda stumped. Exchange MX tools are saying everything is setup and configured correctly from an external point of view.

EDIT:

I don't believe the secondary MX server (MX2) was setup to cache mail in the event the exchange server is unreachable. A now defunct IT contractor came along moved the clients mail from MX2 to an onsite exchange server.

By disappearing email I mean that its not showing up on the exchange server, but in the mailbox on MX2. I used the message tracking interface in exchange to find the emails in question and the following is listed in the message details:

Submitted
23/11/2011 9:32 AM exchangeserver.name.here
The message was submitted to exchangeserver.name.here

Transferred
23/11/2011 9:32 AM exchangeserver.name.here
The message was successfully handed off to a different e-mail system. This is as far as we can track it.

Exchange is handing off the email. I don't want it to, how do I stop it?


Solution 1:

I'm afraid I don't believe Exchange is doing what you claim. Once Exchange has delivered the message locally, that is it - there is no reason to send the mail on elsewhere because it has reached its final destination. That's like giving a letter you receive in the post to somebody else when you've read it - you just don't do that.

It could be a transient error on your Exchange server which is causing remote mail servers to choose a higher preference MX record. If you pardon me from quoting Wikipedia for a moment, this sums it up quite nicely.

It is not specific about what should cause the sender to use a higher-preference MX record, merely that the sender must be able to use higher-preference MX records. Some servers (such as Sendmail and Postfix 2.1 or later) will attempt the next-furthest MX server after some types of temporary delivery failures, such as greeting failures. Other servers (such as qmail and Postfix 2.0 or earlier) will only use more distant MX records if the servers specified in the shortest-distance MX records could not be contacted at all.

-- Wikipedia MX Record article

Before you go removing this second MX record though, you might just want to check it's not working the other way around than you think. At my old place we had our Exchange server as MX preference 10 and an emergency cloud based system at preference 20. This cloud system would accept our mails when the Exchange server was down and deliver them when it was back up (to give a very high level overview, what else it did is not relevant here).

I'm also confused by your comment. You say they have disappearing mail, but then you say it's not disappearing. What is happening with it then, if you don't mind elaborating? Are you maybe seeing a problem that isn't there, and this second MX record is just a red herring?


tl;dr

If the second MX record is definitely nothing to do with your email infrastructure, then it has no business being be there and you should remove it. MX records of all preferences should be capable (even if not immediately) of successfully delivering the message to its recipient.

Solution 2:

Will having 2 MX records pointing to different mail server types cause delivery issues?

Without the proper configuration, this will almost certainly result in a semi-broken system.

I'm not sure why there is 2 MX records setup. ... If so, how do I stop it? Is it as easy as just removing the second MX record

Is that other server suppose to be receiving mail, or is it only setup to send mail? If it is supposed to be able to receive mail, then you are going to need to dig deeper into the configurations and figure out what is going on.

If you don't have any special SMTP routes setup on both mail servers, to deal with this multi-server setup, then you should remove the MX record for the non-exchange server.

It is certainly possible to have that other server setup to act as a backup, but if it hasn't been setup properly, then you will lose mail.