Show/Hide Toolbars

Navigation: Reference

SMTP MX Sending

Scroll Prev Top Next More

When an end-user sends an email message, they will usually send it to an SMTP relay server (or 'smarthost'). This server will usually know about the sender, and may require them to use authentication to send messages.

The next step in sending the message is that the relay server has to send it to the recipient somehow. How it does that is done by using special DNS records called 'MX records'.

If you have an Internet domain, such as mycompany.com you will have DNS records associated with that domain. You may have an 'A record' associated with mycompany.com and www.mycompany.com so that web browsers know how to access the website at those names.

The DNS MX (Mail eXchange) record is a special type of record to tell other mail software where to send mail for your domain. So, the MX record may point to the name for your mail server - such as mail.mycompany.com (it has to point to a host name, not an IP address). You may have multiple MX records with the same or different 'priorities'. The sender should try the MX servers with lower priorities before trying those with higher priorities (if there are MX servers with the same priority, the sender can try them in any order it wishes).

This means that the MX records do not have to point to the same servers (or even servers run by the same company) as where the website is running, and do not have to be run by the same company as host your domain DNS records.

The process

So, if you are using MX sending, the sending software (eg VPOP3) will first look up the MX records for the domain being sent to. It will then try to connect to the servers contained in the MX records. It will try each one in order until it gets a response from one of them and then it will try to send the message through that server. (In some cases, the sender will not try further MX servers once it has received any response from one of them, in other cases, the sender will try all MX servers if it has received failure responses from previous servers. This is implementation dependent - there are advantages and disadvantages to both ways).

If the sending software does not receive a response from any of the MX servers or it receives a '4xx' response (meaning 'try again later') from all the responding servers, then it will hold the outgoing message in a queue to try again later. This means that if you have VPOP3 sending using MX sending, then you may see old messages in the OutQueue. That does not necessarily mean that VPOP3 has not tried to send the messages, but it could be that it has tried and failed to send it so far.

If the sending software does not receive a positive response after a short time (eg 4 hours) it will typically send a message back to the original sending user to say that the message has been delayed. If it does not receive a positive response after a longer time (eg 72 hours) it will fail the message, and send a delivery failure report back to the sender to say the message delivery attempt failed.

The long time before the message is failed is in case the receiving mail server is broken for a few days so that the administrators of that server have a reasonable chance to repair it without messages being lost.

If the sending software receives a 5xx response from an MX server it will typically fail the message immediately, because a 5xx response means that the message has not been accepted and delivery should not be reattempted.

If you are using an SMTP relay server/smarthost run by another company, then you will not see this retry behaviour occurring - you will just see the message being sent, and possibly delivery status notifications coming back. This does not mean the retry behaviour isn't happening, just that it is happening somewhere you can't see it.

 

 

If you think this help topic could be improved, please send us constructive feedback