diff --git a/.kitchen.dokken.yml b/.kitchen.dokken.yml index b2c88e5..53963e3 100644 --- a/.kitchen.dokken.yml +++ b/.kitchen.dokken.yml @@ -90,6 +90,9 @@ suites: - name: server run_list: - recipe[postfix::server] + attributes: + postfix: + use_relay_restrictions_maps: "yes" - name: sasl_auth run_list: diff --git a/recipes/_attributes.rb b/recipes/_attributes.rb index f3ffe6e..d8f2535 100644 --- a/recipes/_attributes.rb +++ b/recipes/_attributes.rb @@ -59,7 +59,7 @@ if node['postfix']['use_virtual_aliases_domains'] end if node['postfix']['use_relay_restrictions_maps'] - default['postfix']['main']['smtpd_relay_restrictions'] = "hash:#{node['postfix']['relay_restrictions_db']}, reject" + node.default_unless['postfix']['main']['smtpd_relay_restrictions'] = "hash:#{node['postfix']['relay_restrictions_db']}, reject" end if node['postfix']['master']['maildrop']['active']