From 09a45b4397f7273129604ae06a98be2a566ba75d Mon Sep 17 00:00:00 2001 From: dofl Date: Wed, 20 Jan 2016 13:25:41 +0100 Subject: [PATCH 1/5] Update mail-postfix.sh The default timeout for Postfix's maximal_queue_lifetime and bounce_queue_lifetime is 5 days. This is way too long if you expect someone to have an answer and after 5 days you'll get the message that it's not delivered. This disrupts communication. It would be more responsive if the user got the 'can't deliver' error after 24 hours. --- setup/mail-postfix.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup/mail-postfix.sh b/setup/mail-postfix.sh index 6124d64e..3298bacc 100755 --- a/setup/mail-postfix.sh +++ b/setup/mail-postfix.sh @@ -60,11 +60,14 @@ apt_install postfix postfix-pcre postgrey ca-certificates # * Set our name (the Debian default seems to be "localhost" but make it our hostname). # * Set the name of the local machine to localhost, which means xxx@localhost is delivered locally, although we don't use it. # * Set the SMTP banner (which must have the hostname first, then anything). +# * Set the default timeout for undeliverable e-mail to 1 day. The default is 5. tools/editconf.py /etc/postfix/main.cf \ inet_interfaces=all \ myhostname=$PRIMARY_HOSTNAME\ smtpd_banner="\$myhostname ESMTP Hi, I'm a Mail-in-a-Box (Ubuntu/Postfix; see https://mailinabox.email/)" \ mydestination=localhost + maximal_queue_lifetime=1d + bounce_queue_lifetime=1d # ### Outgoing Mail From 6f0220da4bf846f281b853e4f8f831043a68a1a0 Mon Sep 17 00:00:00 2001 From: dofl Date: Wed, 20 Jan 2016 15:34:22 +0100 Subject: [PATCH 2/5] Update mail-postfix.sh Same result as maximal_queue_lifetime and bounce_queue_lifetime, but complies with rfc2821. --- setup/mail-postfix.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup/mail-postfix.sh b/setup/mail-postfix.sh index 3298bacc..1572e646 100755 --- a/setup/mail-postfix.sh +++ b/setup/mail-postfix.sh @@ -60,14 +60,13 @@ apt_install postfix postfix-pcre postgrey ca-certificates # * Set our name (the Debian default seems to be "localhost" but make it our hostname). # * Set the name of the local machine to localhost, which means xxx@localhost is delivered locally, although we don't use it. # * Set the SMTP banner (which must have the hostname first, then anything). -# * Set the default timeout for undeliverable e-mail to 1 day. The default is 5. +# * Set the delay_warning_time to 1 day. Informs users that their e-mail delivery is delayed. tools/editconf.py /etc/postfix/main.cf \ inet_interfaces=all \ myhostname=$PRIMARY_HOSTNAME\ smtpd_banner="\$myhostname ESMTP Hi, I'm a Mail-in-a-Box (Ubuntu/Postfix; see https://mailinabox.email/)" \ mydestination=localhost - maximal_queue_lifetime=1d - bounce_queue_lifetime=1d + delay_warning_time=1d # ### Outgoing Mail From 2e693f70115fa5703a6d175c27e70469563f81e3 Mon Sep 17 00:00:00 2001 From: dofl Date: Thu, 21 Jan 2016 08:38:39 +0100 Subject: [PATCH 3/5] Update mail-postfix.sh Updated according to Josh's latest reaction. Sounds good. --- setup/mail-postfix.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setup/mail-postfix.sh b/setup/mail-postfix.sh index 1572e646..c97d2f54 100755 --- a/setup/mail-postfix.sh +++ b/setup/mail-postfix.sh @@ -60,13 +60,18 @@ apt_install postfix postfix-pcre postgrey ca-certificates # * Set our name (the Debian default seems to be "localhost" but make it our hostname). # * Set the name of the local machine to localhost, which means xxx@localhost is delivered locally, although we don't use it. # * Set the SMTP banner (which must have the hostname first, then anything). -# * Set the delay_warning_time to 1 day. Informs users that their e-mail delivery is delayed. +# * Set the delay_warning_time to 3 hours to inform users that their e-mail delivery is delayed. +# * The bounce_queue_lifetime refers to MAILER-DAEMON messages. Should be short and has no effect on regular mail. +# * Set maximal_queue_lifetime to 2 days. Server will try to send an undeliverable e-mail for the maximum of 2 days. + tools/editconf.py /etc/postfix/main.cf \ inet_interfaces=all \ myhostname=$PRIMARY_HOSTNAME\ smtpd_banner="\$myhostname ESMTP Hi, I'm a Mail-in-a-Box (Ubuntu/Postfix; see https://mailinabox.email/)" \ mydestination=localhost - delay_warning_time=1d + delay_warning_time=3h + maximal_queue_lifetime=2d + bounce_queue_lifetime=1d # ### Outgoing Mail From 85a9a1608c9a625f5e337a0fb99ce5806563b6d4 Mon Sep 17 00:00:00 2001 From: dofl Date: Thu, 21 Jan 2016 16:05:43 +0100 Subject: [PATCH 4/5] Update mail-postfix.sh --- setup/mail-postfix.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup/mail-postfix.sh b/setup/mail-postfix.sh index c97d2f54..f7f2e689 100755 --- a/setup/mail-postfix.sh +++ b/setup/mail-postfix.sh @@ -66,11 +66,11 @@ apt_install postfix postfix-pcre postgrey ca-certificates tools/editconf.py /etc/postfix/main.cf \ inet_interfaces=all \ - myhostname=$PRIMARY_HOSTNAME\ + myhostname=$PRIMARY_HOSTNAME \ smtpd_banner="\$myhostname ESMTP Hi, I'm a Mail-in-a-Box (Ubuntu/Postfix; see https://mailinabox.email/)" \ - mydestination=localhost - delay_warning_time=3h - maximal_queue_lifetime=2d + mydestination=localhost \ + delay_warning_time=3h \ + maximal_queue_lifetime=2d \ bounce_queue_lifetime=1d # ### Outgoing Mail From c6c75c5a1784035a978941f4cfb06f45ccb12ffb Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Mon, 15 Feb 2016 18:38:55 -0500 Subject: [PATCH 5/5] document the default values for delay_warning_time, maximal_queue_lifetime, bounce_queue_lifetime --- setup/mail-postfix.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setup/mail-postfix.sh b/setup/mail-postfix.sh index f7f2e689..2dbf32a6 100755 --- a/setup/mail-postfix.sh +++ b/setup/mail-postfix.sh @@ -60,10 +60,8 @@ apt_install postfix postfix-pcre postgrey ca-certificates # * Set our name (the Debian default seems to be "localhost" but make it our hostname). # * Set the name of the local machine to localhost, which means xxx@localhost is delivered locally, although we don't use it. # * Set the SMTP banner (which must have the hostname first, then anything). -# * Set the delay_warning_time to 3 hours to inform users that their e-mail delivery is delayed. -# * The bounce_queue_lifetime refers to MAILER-DAEMON messages. Should be short and has no effect on regular mail. -# * Set maximal_queue_lifetime to 2 days. Server will try to send an undeliverable e-mail for the maximum of 2 days. - +# * Inform users when their e-mail delivery is delayed more than 3 hours (default is not to warn). +# * Stop trying to send an undeliverable e-mail after 2 days (instead of 5), and for bounce messages just try for 1 day. tools/editconf.py /etc/postfix/main.cf \ inet_interfaces=all \ myhostname=$PRIMARY_HOSTNAME \