Forum Moderators: phranque
My question is... does anyone know if an MX lookup will look for just a domain response to return true (@domain.com), or will it also look for a user (someone@domain.com) to return true before moving on to the next record in priority sequence?
Ie. You send an email to "someone@domain.com" the highest priority record points to "location.domain.com", this user does not exist at "location.domain.com". Will it move on to "mail.domian.com" (next in sequence) to try an find this user or will it return as undeliverable because the domain was found on the first server.
Crazy question I know, but I haven't been able to find serious detail on MX record priorty out there, other than the basics.
If the sending SMTP server tries the server with the highest priority and the user is unknown on that server, it will probably receive a 550 SMTP error code meaning "mailbox not found". Most SMTP implementations won't try another server and return an error to the sender. This is because error codes starting with a 5 are permanent errors and SMTP servers shouldn't try again.
You could however try to send a SMTP error code in the 4xx group when the incomming mail is for a user not present on the system. The 421 error code (Service temporarily not available) might be a good choice. 4xx error codes are temporary and the sending server knows that it should retry to deliver the message. Many server implementations will retry on the lower priority SMTP server, so mail for non-existent users on the high priority server will be delivered to the low priority server instead. But there might be SMTP server implementations in the field which rather retry on the high priority server or send a delivery error message to the sender. So this setup might result in lost messages.
For the exact documentation how SMTP servers should work, read the RFC2821 at [ietf.org...]