From bc90626b945267f297e6fd773e21d733ee9e02e9 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sat, 27 Aug 2016 21:23:05 +0000 Subject: [PATCH] make sure postfix still works with postgrey disabled and restrictions not empty --- templates/main.cf-el5.erb | 4 ++++ templates/main.cf.erb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/templates/main.cf-el5.erb b/templates/main.cf-el5.erb index 866db7b..2dae308 100644 --- a/templates/main.cf-el5.erb +++ b/templates/main.cf-el5.erb @@ -883,14 +883,18 @@ smtpd_client_restrictions = <% end -%> <% if !@smtpd_recipient_restrictions.empty? or @postgrey -%> smtpd_recipient_restrictions = +<% if !@smtpd_recipient_restrictions.empty? -%> <% @smtpd_recipient_restrictions.each do |line| -%> <%= line %>, <% end -%> +<% 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 c09ce70..c0026de 100644 --- a/templates/main.cf.erb +++ b/templates/main.cf.erb @@ -892,14 +892,18 @@ smtpd_client_restrictions = <% end -%> <% if !@smtpd_recipient_restrictions.empty? or @postgrey -%> smtpd_recipient_restrictions = +<% if !@smtpd_recipient_restrictions.empty? -%> <% @smtpd_recipient_restrictions.each do |line| -%> <%= line %>, <% end -%> +<% 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? -%>