[pmg-devel] [PATCH pmg-api 3/4] config: postfix: make smtp-filter-timeout configurable

Stoiko Ivanov s.ivanov at proxmox.com
Mon Sep 11 16:23:15 CEST 2023


Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
This patch needs the changes for pmg-docs (actually an updated
pmg-doc-generator package installed) applied.

 src/PMG/Config.pm        | 6 ++++++
 src/templates/main.cf.in | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/PMG/Config.pm b/src/PMG/Config.pm
index 7339e0d..eb6c5c2 100644
--- a/src/PMG/Config.pm
+++ b/src/PMG/Config.pm
@@ -699,6 +699,11 @@ sub properties {
 	    type => 'boolean',
 	    default => 1
 	},
+	filter_timeout => {
+	    description => "Timeout for the processing of one mail (in seconds)  (postfix option `smtpd_proxy_timeout` and `lmtp_data_done_timeout`)",
+	    type => 'integer',
+	    default => 600
+	},
     };
 }
 
@@ -740,6 +745,7 @@ sub options {
 	before_queue_filtering => { optional => 1 },
 	ndr_on_block => { optional => 1 },
 	smtputf8 => { optional => 1 },
+	filter_timeout => { optional => 1 },
     };
 }
 
diff --git a/src/templates/main.cf.in b/src/templates/main.cf.in
index 516bc2f..764f9a3 100644
--- a/src/templates/main.cf.in
+++ b/src/templates/main.cf.in
@@ -50,9 +50,10 @@ default_transport = smtp:[% pmg.mail.smarthost %]:[% pmg.mail.smarthostport %]
 [% END %]
 
 [% IF pmg.mail.before_queue_filtering -%]
-smtpd_proxy_timeout = 600s
+smtpd_proxy_timeout = [% pmg.mail.filter_timeout %]s
 [% ELSE %]
 content_filter=scan:127.0.0.1:10024
+lmtp_data_done_timeout = [% pmg.mail.filter_timeout %]s
 [%- END %]
 
 mail_name = Proxmox
-- 
2.39.2





More information about the pmg-devel mailing list