[pmg-devel] [PATCH pmg-api 1/2] enable policy if greylist6 is enabled
    Stoiko Ivanov 
    s.ivanov at proxmox.com
       
    Tue Apr 21 12:43:29 CEST 2020
    
    
  
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 at proxmox.com>
---
 src/PMG/Config.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PMG/Config.pm b/src/PMG/Config.pm
index 093401a..cd69c9c 100755
--- a/src/PMG/Config.pm
+++ b/src/PMG/Config.pm
@@ -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$/) {
-- 
2.20.1
    
    
More information about the pmg-devel
mailing list