From 1f10a66956f0b7e060c53efd0fc3915f38d76ef2 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Wed, 26 Jun 2024 15:00:09 +0000 Subject: [PATCH] Correct the Exim queue threshold for Mailman In change I9e21eb19b85c9a4b19f5e6c5d03a89c89028bbc4 we incorrectly adjusted Exim's smtp_accept_max_per_host option from 10 to 50 rather than setting the smtp_accept_queue_per_connection option we actually needed. Add this parameter as a new tunable in the role, set the other option back to its prior value, and update comment references accordingly. Change-Id: I13f0275202eba8b5190a76bff921f1ac5adbeea0 --- inventory/service/group_vars/mailman3.yaml | 3 ++- playbooks/roles/base/exim/README.rst | 8 ++++++++ playbooks/roles/base/exim/templates/exim4.conf.j2 | 5 +++++ playbooks/roles/mailman3/templates/mailman-extra.cfg.j2 | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/inventory/service/group_vars/mailman3.yaml b/inventory/service/group_vars/mailman3.yaml index d941d046d6..9d7bcca469 100644 --- a/inventory/service/group_vars/mailman3.yaml +++ b/inventory/service/group_vars/mailman3.yaml @@ -25,8 +25,9 @@ borg_backup_excludes_extra: exim_queue_interval: '1m' exim_queue_run_max: '50' exim_smtp_accept_max: '100' +exim_smtp_accept_max_per_host: '10' # This should be set to more than mailman's mta.max_recipients value. -exim_smtp_accept_max_per_host: '50' +exim_smtp_accept_queue_per_connection: '50' exim_routers: - mailman_verp_router: | {% raw -%} diff --git a/playbooks/roles/base/exim/README.rst b/playbooks/roles/base/exim/README.rst index 2b6e7e4081..a2685f01b2 100644 --- a/playbooks/roles/base/exim/README.rst +++ b/playbooks/roles/base/exim/README.rst @@ -52,3 +52,11 @@ Installs and configures the exim mail server code 421. The option’s default value imposes no limit. If this option is set greater than zero, it is required that :zuul:rolevar:`exim.exim_smtp_accept_max` be non-zero. + +.. zuul:rolevar:: exim_smtp_accept_queue_per_connection + :default: null + + The maximum number of delivery processes Exim will start for incoming SMTP + calls before it shunts them to periodic queue processing instead. If + the value is set to zero, no limit is applied. If this option is not set, + Exim will implicitly apply a default value of 10. diff --git a/playbooks/roles/base/exim/templates/exim4.conf.j2 b/playbooks/roles/base/exim/templates/exim4.conf.j2 index 55d2d5a480..a19a3b7a7c 100644 --- a/playbooks/roles/base/exim/templates/exim4.conf.j2 +++ b/playbooks/roles/base/exim/templates/exim4.conf.j2 @@ -334,6 +334,11 @@ smtp_accept_max = {{ exim_smtp_accept_max }} smtp_accept_max_per_host = {{ exim_smtp_accept_max_per_host }} {% endif %} +{% if exim_smtp_accept_queue_per_connection is defined %} +# threshold for immediate delivery processing +smtp_accept_queue_per_connection = {{ exim_smtp_accept_queue_per_connection }} +{% endif %} + ###################################################################### # ACL CONFIGURATION # # Specifies access control lists for incoming SMTP mail # diff --git a/playbooks/roles/mailman3/templates/mailman-extra.cfg.j2 b/playbooks/roles/mailman3/templates/mailman-extra.cfg.j2 index f9cf5bbccf..b3d8c0bd3b 100644 --- a/playbooks/roles/mailman3/templates/mailman-extra.cfg.j2 +++ b/playbooks/roles/mailman3/templates/mailman-extra.cfg.j2 @@ -5,7 +5,7 @@ # a human. site_owner: "root@{{ ansible_fqdn }}" -# We set this to less than the Exim's smtp_accept_max_per_host value. +# We set this to less than the Exim's smtp_accept_queue_per_connection value. [mta] max_recipients: 45