]> git.proxmox.com Git - pmg-api.git/commitdiff
fix postfix template for before-queue filtering
authorStoiko Ivanov <s.ivanov@proxmox.com>
Mon, 27 Jan 2020 14:40:13 +0000 (15:40 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 28 Jan 2020 20:24:11 +0000 (21:24 +0100)
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 <s.ivanov@proxmox.com>
[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

index aa52c081e38e006f5ed81cc6d9b5e9d3d5800cfb..1526709293b73d18a9f17eaa286de03e090df7a2 100644 (file)
@@ -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