From f08eec467e348703d8d274091c9a92d5be31d293 Mon Sep 17 00:00:00 2001 From: efoft Date: Mon, 9 Jul 2018 12:28:34 +0300 Subject: [PATCH 1/2] add check_policy_service only when postgrey set to true --- templates/main.cf.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/main.cf.erb b/templates/main.cf.erb index 2e0beb0..76abcc7 100644 --- a/templates/main.cf.erb +++ b/templates/main.cf.erb @@ -908,11 +908,13 @@ smtpd_recipient_restrictions = <% @smtpd_recipient_restrictions.each do |line| -%> <%= line %>, <% end -%> +<% if @postgrey -%> <% if @postgrey_policy_service -%> check_policy_service <%= @postgrey_policy_service %>, <% else -%> check_policy_service unix:postgrey/socket, <% end -%> +<% end -%> <% end -%> <% if !@smtpd_data_restrictions.empty? -%> From a019564c1671db07cb4eb845ebc910249785f1ed Mon Sep 17 00:00:00 2001 From: efoft Date: Mon, 9 Jul 2018 12:28:34 +0300 Subject: [PATCH 2/2] add check_policy_service only when postgrey set to true --- templates/main.cf-el5.erb | 2 ++ templates/main.cf.erb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/templates/main.cf-el5.erb b/templates/main.cf-el5.erb index 95adb67..840c898 100644 --- a/templates/main.cf-el5.erb +++ b/templates/main.cf-el5.erb @@ -886,11 +886,13 @@ smtpd_recipient_restrictions = <% @smtpd_recipient_restrictions.each do |line| -%> <%= line %>, <% end -%> +<% if @postgrey -%> <% if @postgrey_policy_service -%> check_policy_service <%= @postgrey_policy_service %>, <% else -%> check_policy_service unix:postgrey/socket, <% end -%> +<% end -%> <% end -%> <% if !@smtpd_data_restrictions.empty? -%> diff --git a/templates/main.cf.erb b/templates/main.cf.erb index 2e0beb0..76abcc7 100644 --- a/templates/main.cf.erb +++ b/templates/main.cf.erb @@ -908,11 +908,13 @@ smtpd_recipient_restrictions = <% @smtpd_recipient_restrictions.each do |line| -%> <%= line %>, <% end -%> +<% if @postgrey -%> <% if @postgrey_policy_service -%> check_policy_service <%= @postgrey_policy_service %>, <% else -%> check_policy_service unix:postgrey/socket, <% end -%> +<% end -%> <% end -%> <% if !@smtpd_data_restrictions.empty? -%>