User Tools

Site Tools


reference:smtp_direct

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

reference:smtp_direct [2018/11/14 10:45] (current)
Line 1: Line 1:
 +======Mail Connectors -> Mail Senders -> SMTP Direct======
  
 +VPOP3 can be configured to send mail directly to the recipient'​s mail server (or the recipient'​s mail service provider). Usually this is only used if you have a high-end business class Internet connection - such as a leased line, or your mail server is co-located in a data centre. Attempts to use SMTP Direct sending on a dial-up/​ADSL/​Cable/​FTTC/​etc connection may be problematic since the receiving mail server may think you a home user who has been infected with  a [[wp>​spambot]] rather than a proper mail server.
 +
 +To have the most chance of SMTP Direct sending working you should have: 
 +  * A fixed IP address
 +  * A reverse DNS entry set up for your mail server (contact your Internet connection provider to configure this)
 +  * A business class Internet connection (home Internet connections are more often blocked by receiving mail servers)
 +
 +[[mail_senders|Description of mail sending methods]]
 +
 +=====Tabs=====
 +The //SMTP Direct// settings tell VPOP3 how to send mail directly to the recipients'​ mail servers
 +
 +  * [[Sender General|General]]
 +  * [[Sender Direct Settings|Settings]]
 +  * [[Sender Advanced Settings|Advanced Settings]]
 + 
 +=====How SMTP Direct sending works=====
 +For a full description of SMTP direct sending you should consult [[http://​tools.ietf.org/​html/​rfc5321|RFC 5321]], but below is a brief description.
 +
 +====Finding target mail servers====
 +When a mail server wants to send a message to a recipient, eg //​someone@example.com//,​ it first does a DNS lookup for **MX** records for //​example.com//​. Those MX records will indicate the **name** of the mail server(s) which handle mail for the target domain (IP addresses are not allowed, they must be host names). The MX records also indicate a **priority** of the mail server (lower numbers are tried first)
 +
 +(If no MX records exist for the target domain, then the mail server does a DNS lookup for an A record for the target domain, and tries that).
 +
 +For instance, the DNS lookup may return:
 +  * mail.example.com ​ - priority 10
 +  * mx2.example.com ​ - priority 20
 +
 +In this case, the sending mail server will then resolve the **mail.example.com** name. This name may resolve to one or more IP addresses, so the sending mail server will try to connect to all the IP addresses of '​mail.example.com'​ (in a random order). If none of those '​work'​ (for some definition of work), then the sending mail server will do the same for the **mx2.example.com** name
 +
 +Different sending mail servers try alternative servers in different ways. For instance, VPOP3 will currently only retry later mail servers if the earlier mail server doesn'​t respond at all. If the earlier servers respond but give an error, VPOP3 assumes that the subsequent servers will give the same error, so it doesn'​t bother trying those at the same time so as to avoid wasting time. Other servers may try other servers if earlier servers give errors. The standards are not clear on this, and different people prefer different methods.
 +
 +====Error handling====
 +SMTP has two types of error codes:
 +  * Permanent errors - these error codes begin with a 5 (eg 520 or 507). If one of these error codes is received, then the sending mail server should not try to send the same message again
 +  * Temporary errors - these error codes begin with a 4 (eg 415 or 421). If one of these error codes is received, the sending mail server should try sending the message again later (subject to retry limits). TCP/IP connection errors are treated as temporary errors as well.
 +
 +If you send mail via an SMTP relay server, the relay server will usually accept the message immediately,​ then you will not see the effects of any temporary errors, as the retries are handled by the SMTP relay server. However, if you have VPOP3 sending mail directly, then you will see that messages may not be sent, but may '​stick'​ in the out queue - this can happen if the target mail server reports a 4xy error code, VPOP3 will leave the message in the outqueue to try again later. In VPOP3, you can open the message in the Outqueue viewer in the settings, and it will show you how many times it has retried, and what the most recent error was for that message.
reference/smtp_direct.txt ยท Last modified: 2018/11/14 10:45 (external edit)