]> git.proxmox.com Git - pmg-api.git/commitdiff
enable policy if greylist6 is enabled
authorStoiko Ivanov <s.ivanov@proxmox.com>
Tue, 21 Apr 2020 10:43:29 +0000 (12:43 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 21 Apr 2020 16:42:37 +0000 (18:42 +0200)
the usepolicy variable is used by the templateing system to decide whether
pmgpolicy should be asked by postfix and should also be enabled if greylisting
is only active for ipv6.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PMG/Config.pm

index 093401aa8ca3fdf1e2c175c3cf958563b1eafedb..cd69c9cdbfff5eb8160b4d0b3591dcec910082c8 100755 (executable)
@@ -1353,7 +1353,7 @@ sub get_template_vars {
 
     my $usepolicy = 0;
     $usepolicy = 1 if $self->get('mail', 'greylist') ||
-       $self->get('mail', 'spf');
+       $self->get('mail', 'greylist6') || $self->get('mail', 'spf');
     $vars->{postfix}->{usepolicy} = $usepolicy;
 
     if ($int_ip =~ m/^$IPV6RE$/) {