From 01f83cdac8535fbab1bce1750dfad80ba4d4c472 Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Mon, 27 Jan 2020 15:40:13 +0100 Subject: [PATCH] fix postfix template for before-queue filtering Introducing before-queue support in e0cbdf9fc98178f97223922f305cc19d6d29262d missed adapting the relevant settings in the template for 'main.cf'. Since the settings were overridden in the smtpd instances the error only shows for locally generated mail (e.g. from cronjobs): ``` warning: connect to transport private/scan: Connection refused ``` Instead of globally setting 'smtpd_proxy_filter' (and associated options) in 'main.cf', as is done for 'content_filter' (for afterqueue filtering), this patch removes the global 'content_filter' setting. This is done since 'smtp_proxy_filter' only applies to smtp sessions [0] and all incoming smtpd processes get the setting in 'master.cf.in'. Signed-off-by: Stoiko Ivanov [0] see http://www.postfix.org/SMTPD_PROXY_README.html - the proxy speaks smtp, and it's answers are sent to the sending server. --- src/templates/main.cf.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/templates/main.cf.in b/src/templates/main.cf.in index aa52c08..1526709 100644 --- a/src/templates/main.cf.in +++ b/src/templates/main.cf.in @@ -49,7 +49,9 @@ relay_transport = [% pmg.mail.relayprotocol %]:[% pmg.mail.relay %]:[% pmg.mail. default_transport = smtp:[% pmg.mail.smarthost %]:[% pmg.mail.smarthostport %] [% END %] +[% IF ! pmg.mail.before_queue_filtering -%] content_filter=scan:127.0.0.1:10024 +[%- END %] mail_name = Proxmox -- 2.39.2