- node[:exim][:daemon_smtp_ports].each do |port|
- firewall_rule "accept-inbound-smtp-#{port}" do
- action :accept
- family :inet
- source "net:#{smarthosts_inet.sort.join(',')}"
- dest "fw"
- proto "tcp"
- dest_ports port
- source_ports "1024-65535"
- not_if { smarthosts_inet.empty? }
- end
-
- firewall_rule "accept-inbound-smtp-#{port}" do
- action :accept
- family :inet6
- source "net:#{smarthosts_inet6.sort.join(',')}"
- dest "fw"
- proto "tcp"
- dest_ports port
- source_ports "1024-65535"
- not_if { smarthosts_inet6.empty? }
- end
+ firewall_rule "accept-inbound-smtp" do
+ action :accept
+ context :incoming
+ protocol :tcp
+ source smarthosts
+ dest_ports node[:exim][:daemon_smtp_ports]
+ source_ports "1024-65535"
+ not_if { smarthosts.empty? }