X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/261e7e9cd1a9882faa4ed7087b5902ebafe25988..7be9473d2bb0cfc6f839e72ee8ad9ea209067f85:/cookbooks/exim/recipes/default.rb?ds=sidebyside diff --git a/cookbooks/exim/recipes/default.rb b/cookbooks/exim/recipes/default.rb index 61731d8e4..0ebf4206e 100644 --- a/cookbooks/exim/recipes/default.rb +++ b/cookbooks/exim/recipes/default.rb @@ -60,7 +60,7 @@ end relay_to_domains = node[:exim][:relay_to_domains] node[:exim][:routes].each_value do |route| - relay_to_domains = relay_to_domains | route[:domains] + relay_to_domains = relay_to_domains | route[:domains] if route[:host] end relay_from_hosts = node[:exim][:relay_from_hosts] @@ -119,7 +119,7 @@ end munin_plugin "exim_mailqueue" munin_plugin "exim_mailstats" -if not relay_to_domains.empty? or not node[:exim][:local_domains].empty? +if node[:exim][:smarthost_name] node[:exim][:daemon_smtp_ports].each do |port| firewall_rule "accept-inbound-smtp-#{port}" do action :accept @@ -130,6 +130,17 @@ if not relay_to_domains.empty? or not node[:exim][:local_domains].empty? source_ports "1024:" end end +else + node[:exim][:daemon_smtp_ports].each do |port| + firewall_rule "accept-inbound-smtp-#{port}" do + action :accept + source "bm:mail.openstreetmap.org" + dest "fw" + proto "tcp:syn" + dest_ports port + source_ports "1024:" + end + end end if node[:exim][:smarthost_via]