4

Setting up an E-Mail server, I wonder, what if it goes down. Do I need a redundant setup in order to not lose incoming mails? Or would it suffice to make sure it doesn't go offline for longer than, say, a day?

2
  • How are the mails delivered to your mail server? Oct 23, 2018 at 8:07
  • 2
    In general: the sending smtp server will retry delivery until either your mailserver confirms that the message has been received or it gives up and returns a failure report to the sender. What happens after the message has been received (and is stored to disk) on your mail server is of course your responsibility (your anti spam/virus may for instance still discard messages) and to comply to regulatory requirements and maintain a complete message archive for e-discovery or how to support recovery from users deleting messages from their INBOX is quite different.
    – HBruijn
    Oct 23, 2018 at 10:08

2 Answers 2

7

The place to look for an official answer to this question is RFC 5321. Here is what RFC 5321 has to say:

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. It MAY be appropriate to set a shorter maximum number of retries for non- delivery notifications and equivalent error messages than for standard messages. The parameters to the retry algorithm MUST be configurable.

So, if your server stays down for even three days, you shouldn't expect any mails to be lost, but they will of course get delayed.

A couple of advantages to having two MXs on different networks are:

  • You avoid most emails getting delayed when one of the two is down.
  • You have less risk of emails unable to be delivered when connectivity problems unbeknownst to you prevent a single sending server from reaching one of the networks hosting an MX of yours.
2
  • 2
    Huray for quoting the official RFC instead of my source, i.e. Wikipedia.
    – Tommiie
    Oct 23, 2018 at 9:19
  • @Tom Thanks guys, this is surprisingly specific! Really cool, and indeed I'm most interested on the receiving end. BTW, I recently setup a server and one of the receiving filters (SPF or DKIM) wasn't configured correctly yet and I noticed already that the mail provider GMX was resending once an hour or so until that was fixed
    – Philip
    Oct 23, 2018 at 13:58
6

When mail servers have to deliver emails to you(r mail server), they must maintain a queue for when your mail server is offline. From Wikipedia:

Fully capable SMTP servers maintain queues of messages for retrying message transmissions that resulted in transient failures.

The Postfix documentation also provides some more information on this.

Thus, as long as your mail server doesn't stay down for too long, you wont lose any emails. That being said, a redundant setup is of course better so you receive the emails almost instantaneously and you can keep sending out emails as well.

Edit: Sending out emails can be done by a completely different server. Your question was only for receiving email so that server going down does not necessarily impact your capability to send emails.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .