When a mail server gives Connection Refused, emails will come through in future attempts assuming the mail server comes back online. How well supported is this? Do all mail servers support this? Is it only the more robust ones? Is it defacto standard or spec?
2 Answers
SMTP servers usually try to deliver message for days. It is specified in RFC 5321 Simple Mail Transfer Protocol, Section 6.1 Reliable Delivery and Replies by Email and Section 4.5.4 Retry Strategies.
EDIT
Added excerpts from RFC:
When the receiver-SMTP accepts a piece of mail (by sending a "250 OK" message in response to DATA), it is accepting responsibility for delivering or relaying the message. It must take this responsibility seriously. It MUST NOT lose the message for frivolous reasons, such as because the host later crashes or because of a predictable resource shortage.
...
mail that cannot be transmitted immediately MUST be queued and periodically retried by the sender.
...
Retries continue until the message is transmitted or the sender gives up; the give-up time generally needs to be at least 4-5 days.
As mentioned it is described at RFC 5321 but unfortunately the implementation in SMTP Servers differ. There are at least these scenarios:
- Retrying every 5 second
- every hour
- double the time between attempts
- retrying in steps of minutes 5, 10, 15, 20, ...
- retrying never
Some servers even distinguish between 4xy retry codes, connection lost, timeouts, network unreachable and other temporary errors and behave differently on each of the condition.
To sum it up: Even if there is a standard you have to admit that can't relay on the implementation.

- 17,023
- 2
- 37
- 69
-
If host never retries sending mail then it will be violation of RFC requirements. Sec 4.5.4.1 "mail that cannot be transmitted immediately MUST be queued and periodically retried by the sender". – AlexD Jul 29 '11 at 04:04
-
**I** know that. But you have to tell that to the software manufacturer. – mailq Jul 29 '11 at 16:38