[pmg-devel] [PATCH pmg-api] Add postfix dnsbl threshold
Alexander Plank
Alexander.Plank at siconnex.com
Wed Jun 13 15:28:25 CEST 2018
Signed-off-by: Alexander Plank <alexander.plank at siconnex.com>
---
PMG/Config.pm | 9 +++++++++
templates/main.cf.in | 1 +
2 files changed, 10 insertions(+)
diff --git a/PMG/Config.pm b/PMG/Config.pm
index b42cfee..67a301b 100644
--- a/PMG/Config.pm
+++ b/PMG/Config.pm
@@ -585,6 +585,12 @@ sub properties {
description => "Optional list of DNS white/blacklist domains (see postscreen_dnsbl_sites parameter).",
type => 'string', format => 'dnsbl-entry-list',
},
+ dnsbl_threshold => {
+ description => "The inclusive lower bound for blocking a remote SMTP client, based on its combined DNSBL score (see postscreen_dnsbl_threshold parameter).",
+ type => 'integer',
+ minimum => 0,
+ default => 1
+ },
};
}
@@ -617,6 +623,7 @@ sub options {
message_rate_limit => { optional => 1 },
verifyreceivers => { optional => 1 },
dnsbl_sites => { optional => 1 },
+ dnsbl_threshold => { optional => 1 },
};
}
@@ -1103,6 +1110,8 @@ sub get_template_vars {
if (scalar(@dnsbl_sites)) {
$vars->{postfix}->{dnsbl_sites} = join(',', @dnsbl_sites);
}
+
+ $vars->{postfix}->{dnsbl_threshold} = $self->get('mail', 'dnsbl_threshold');
my $usepolicy = 0;
$usepolicy = 1 if $self->get('mail', 'greylist') ||
diff --git a/templates/main.cf.in b/templates/main.cf.in
index 1eac9a5..5486d5a 100644
--- a/templates/main.cf.in
+++ b/templates/main.cf.in
@@ -62,6 +62,7 @@ postscreen_access_list =
[% IF postfix.dnsbl_sites %]
postscreen_dnsbl_sites = [% postfix.dnsbl_sites %]
+postscreen_dnsbl_threshold = [% postfix.dnsbl_threshold %]
[% END %]
postscreen_dnsbl_action = enforce
--
2.14.1.windows.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pve.proxmox.com/pipermail/pmg-devel/attachments/20180613/81ff12aa/attachment.html>
More information about the pmg-devel
mailing list