From d5eeb3e8af18e9cee48452eae79bd142f7d24ebc Mon Sep 17 00:00:00 2001 From: dofl Date: Sat, 8 Jun 2019 15:10:46 +0200 Subject: [PATCH 1/2] Update main.cf I was looking into creating a backup mx server for a high availability mailcow setup. It seems that this is not easily done. While researching to find out how long an average SMTP server keeps trying to send to a server that is down I found that RFC 5321 advises at least 4 to 5 days. Mailcow has a custom setup of 1 day, which is very short. The user will be unaware for 5 days that his mail has not been delivered, which can be negative. But I still would like to follow the advice of the RFC. RFC 5321, in section 4.5.4.1, has this to say: Retries continue until the message is transmitted or the sender 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. Postfix default is also 5 days: http://www.postfix.org/postconf.5.html https://tools.ietf.org/html/rfc5321#section-4.5.4 --- data/conf/postfix/main.cf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/conf/postfix/main.cf b/data/conf/postfix/main.cf index b0fda8bb..95301c43 100644 --- a/data/conf/postfix/main.cf +++ b/data/conf/postfix/main.cf @@ -19,7 +19,7 @@ bounce_queue_lifetime = 1d broken_sasl_auth_clients = yes disable_vrfy_command = yes maximal_backoff_time = 1800s -maximal_queue_lifetime = 1d +maximal_queue_lifetime = 5d message_size_limit = 104857600 milter_default_action = accept milter_protocol = 6 From fa4c4b138e4723938278f6658f7dcf56ba349604 Mon Sep 17 00:00:00 2001 From: dofl Date: Sun, 9 Jun 2019 07:39:36 +0200 Subject: [PATCH 2/2] Update main.cf Added the delay_warning_time (http://www.postfix.org/postconf.5.html#delay_warning_time) with 4 hours as setting. Postfix will inform the user that the e-mail has not been delivered, but that it will try for the next 5 days. There is also a setting called confirm_delay_cleared (http://www.postfix.org/postconf.5.html#confirm_delay_cleared), but according to the Postfix this can lead to a sudden burst of notifications at the end of a prolonged network outage. --- data/conf/postfix/main.cf | 1 + 1 file changed, 1 insertion(+) diff --git a/data/conf/postfix/main.cf b/data/conf/postfix/main.cf index 95301c43..bd8f76ed 100644 --- a/data/conf/postfix/main.cf +++ b/data/conf/postfix/main.cf @@ -20,6 +20,7 @@ broken_sasl_auth_clients = yes disable_vrfy_command = yes maximal_backoff_time = 1800s maximal_queue_lifetime = 5d +delay_warning_time = 4h message_size_limit = 104857600 milter_default_action = accept milter_protocol = 6