]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/exim/recipes/default.rb
Fix some foodcritic complaints
[chef.git] / cookbooks / exim / recipes / default.rb
index da8ba5c9cb981a3aabe96ba30f5a901bfd50355d..099e047c6cc1b821a8f13816a53455aeae3ef291 100644 (file)
@@ -144,12 +144,11 @@ else
   end
 end
 
-if node[:exim][:smarthost_via]
-  firewall_rule "deny-outbound-smtp" do
-    action :reject
-    source "fw"
-    dest "net"
-    proto "tcp:syn"
-    dest_ports "smtp"
-  end
+firewall_rule "deny-outbound-smtp" do
+  action :reject
+  source "fw"
+  dest "net"
+  proto "tcp:syn"
+  dest_ports "smtp"
+  only_if { node[:exim][:smarthost_via] }
 end