Link to home
Start Free TrialLog in
Avatar of Tim Ballin
Tim Ballin

asked on

MX Failover Behavior

Will MX fail-over occur if a 550 5.1.1 : User unknown error is encountered? In other words, if an SMTP client tries sending to the highest priority mail exchanger listed in the DNS record, and a user unknown error is encountered, will the client then attempt to send to a mail exchanger with a lower priority? If not, how exactly will it behave?
Avatar of David Favor
David Favor
Flag of United States of America image

First, MX Failover is handled by setting up multiple MX records.

1) MX records at lowest priority (which are accepting connections) pickup the connection.

2) MX records with same priority... tend to round robin... in a way... not true round robin... just similar...

3) Will MX fail-over occur if a 550 5.1.1 : User unknown error is encountered? In other words, if an SMTP client tries sending to the highest priority mail exchanger listed in the DNS record, and a user unknown error is encountered, will the client then attempt to send to a mail exchanger with a lower priority? If not, how exactly will it behave?

No.

MX selection is made based on if an MX picks up or not.
Avatar of noci
noci

Some added explanation:
MX allows to switch to lower priority SMTP servers if you fail to connect TCP port 25.

The moment a connect succeeds, no other servers will be tried. (All MX servers are expected to be effectively be the same, just a different address to try).
The connected state is the TCP connected state (not the SMTP accepted state which is a lot later)..

So any response like receiving unknown user will also mean the other servers would (and SHOULD)  tell that to the sender. So there would (and should) be no difference between servers.
ASKER CERTIFIED SOLUTION
Avatar of skullnobrains
skullnobrains

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
skullnobrains brings up an important point. The RFC is vague about how exactly MX priority should be handled for every XXX type of return code when submitting to an MTA.

Because of this vagueness... and... generally vague behavior only kicks in for 4XX (temporary failures).

For 5XX (hard failures which will never recover), most MTAs never proceed, because a 550 5.1.1 : User unknown on one MX will almost surely produce the same error on all other MX servers, so there's no reason to proceed.
Suggestion: There's some reason you're asking this specific question.

Consider opening another question to describe the exact problem you're trying to resolve.

Likely someone can provide some good direction toward a problem resolution.