This is a question about MX procotol priority. If I have two server as MX with different priority:
- MX 10 serverA
- MX 20 serverB
Is this guarantee by the protocol that the MX 10 is the prefered? Can the submitter choose the secondary for any other reason but primary availability?
In other words: if my serverA MX is well working and with (theoretical) infinite connection capacity, can I be sure that nobody will try a connection to serverB?
Under normal circumstances the server will connect to the first one that is available, but there are many reasons the first one may be unavailable to one person but not the next. Some of these reasons include things you have no control over. However the general rule is try from lowest to highest until there is a response and then use that server.
Where there tends to be an exception is spam. Often the lower numbered MX records will point to hosted services, spam filtering etc. The highest numbered MX record will be a "failsafe" and often point directly to the IP of your server. The idea being if the hosted service fails mail will still be delivered. With this is mind Spammers will look up the highest number and send mail there.
You cannot be sure because the client can also have some network errors and fail to connect to
serverA
, then repair network and try to connect to serverB.It's entirely up to the person that wrote the SMTP engine that's attempting to do the contact. By design it's try MX in ascending numeric order, then try the A record. However, the programmer is free to do or not do that as they see fit and mail will normally still get delivered...