From 1b38a184730a80e88e6abf7c507eaf77cebe0148 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 27 Jan 2025 14:48:33 +0000 Subject: [PATCH] Increase message_linelength_limit to 1G Exim 4.95 on Ubuntu Jammy started enforcing an outbound line length limit of 998 bytes, easily exceeded by some badly-behaved MUAs. Unfortunately, because Exim only checks this in its remote_smtp transport, it results in mass bounces back for Mailman mailing lists, incrementing all subscribers bounce scores on lists where bounce processing is enabled. The telltale indicator is that the messages are returned to Mailman citing a delivery error of "message has lines too long for transport". Ubuntu added a workaround in later versions of their packages, but did not backport that to Jammy. Regardless, it's overridden by a config option and we replace the default Exim config entirely, so need to incorporate it into ours directly anyway. Because this message_linelength_limit option to the remote_smtp transport is only supported by exim versions on Jammy and newer, exclude it for our older platforms so that it won't result in a configuration loading error. This copies the override value used in Ubuntu Noble's exim4.conf.template file. Change-Id: I38e169dc14e7fc3c5c1d43b5f147e6b35b718bb2 --- playbooks/roles/base/exim/templates/exim4.conf.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/playbooks/roles/base/exim/templates/exim4.conf.j2 b/playbooks/roles/base/exim/templates/exim4.conf.j2 index a19a3b7a7c..510c34a2f8 100644 --- a/playbooks/roles/base/exim/templates/exim4.conf.j2 +++ b/playbooks/roles/base/exim/templates/exim4.conf.j2 @@ -619,6 +619,9 @@ begin transports remote_smtp: driver = smtp + {% if ansible_distribution_version is version('22.04', '>=') -%} + message_linelength_limit = 1G + {% endif %} # This transport is used for local delivery to user mailboxes in traditional