From 787749f4d662a1ee98209979c3945c87f5b6247d Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 11 Nov 2026 16:34:13 +0100 Subject: [PATCH] update delivery-main.cf.in: adjust size limits and alias maps for consistency with Postfix instance --- files/srs/templates/delivery-main.cf.in | 27 ++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/files/srs/templates/delivery-main.cf.in b/files/srs/templates/delivery-main.cf.in index f4daee1..ec92dd5 100644 --- a/files/srs/templates/delivery-main.cf.in +++ b/files/srs/templates/delivery-main.cf.in @@ -34,8 +34,14 @@ mynetworks = 127.0.0.0/8 # itself the final destination for. mydestination = @MYDESTINATION@ -# Maximum size of a user mailbox -mailbox_size_limit = 51200000 +# Size limits: taken from the regular Postfix instance. ALL mail that is +# not delivered locally (outgoing mail of own users AND external alias +# forwards) passes this instance (default_transport = srs-forward), so the +# limits must match - otherwise the reinjection is rejected with +# "552 5.3.4 Message size exceeds fixed limit". +message_size_limit = @MESSAGE_SIZE_LIMIT@ +mailbox_size_limit = @MAILBOX_SIZE_LIMIT@ +virtual_mailbox_limit = @VIRTUAL_MAILBOX_LIMIT@ # Optional external command to use instead of mailbox delivery. If set, # you must set up an alias to forward root mail to a real user. @@ -45,7 +51,10 @@ mailbox_command = # List of alias maps to use to lookup local addresses. # Per Debian Policy it should be /etc/aliases. -alias_maps = $alias_database, nis:mail.aliases +# Taken from the regular instance (the Debian default +# "$alias_database, nis:mail.aliases" logs "NIS domain name not set" +# on every smtpd recipient lookup). +alias_maps = @ALIAS_MAPS@ # List of alias maps to make indexes on, when running newaliases. alias_database = hash:/etc/aliases @@ -106,6 +115,18 @@ smtp_tls_mandatory_protocols = @SMTP_TLS_MANDATORY_PROTOCOLS@ smtp_tls_protocols = @SMTP_TLS_PROTOCOLS@ smtp_tls_security_level = @SMTP_TLS_SECURITY_LEVEL@ +# Further settings taken from the regular Postfix instance: this instance +# does the actual SMTP delivery to the outside, so queue lifetimes, delay +# warnings, TLS policy, TLS logging/session cache and smtp_generic_maps +# must behave like the regular instance. +maximal_queue_lifetime = @MAXIMAL_QUEUE_LIFETIME@ +bounce_queue_lifetime = @BOUNCE_QUEUE_LIFETIME@ +delay_warning_time = @DELAY_WARNING_TIME@ +smtp_tls_policy_maps = @SMTP_TLS_POLICY_MAPS@ +smtp_tls_loglevel = @SMTP_TLS_LOGLEVEL@ +smtp_tls_session_cache_database = @SMTP_TLS_SESSION_CACHE_DATABASE@ +smtp_generic_maps = @SMTP_GENERIC_MAPS@ + # config_directory is intentionally NOT set here: the instance is started by # postfix@srs-delivery.service with MAIL_CONFIG=/etc/postfix-srs/delivery # (systemd turns the '-' in the instance name into '/'). Setting it again in