]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/spamassassin/recipes/default.rb
Use backends in York, while Ramoth is sick/recovering.
[chef.git] / cookbooks / spamassassin / recipes / default.rb
index 2c7e49dd58cf3a73755fa3b83db60b5757d1938c..28e3a1cd5a42d5aa8afeb7db81d15f5bab725a8b 100644 (file)
@@ -27,14 +27,14 @@ end
 directory "/var/spool/spamassassin" do
   owner "debian-spamd"
   group "debian-spamd"
-  mode 0755
+  mode 0o755
 end
 
 template "/etc/default/spamassassin" do
   source "spamassassin.erb"
   owner "root"
   group "root"
-  mode 0644
+  mode 0o644
   notifies :restart, "service[spamassassin]"
 end
 
@@ -42,17 +42,17 @@ trusted_networks = node[:exim][:relay_from_hosts]
 
 if node[:exim][:smarthost_name]
   search(:node, "exim_smarthost_via:#{node[:exim][:smarthost_name]}\\:*").each do |host|
-    trusted_networks = trusted_networks | host.ipaddresses(:role => :external)
+    trusted_networks |= host.ipaddresses(:role => :external)
   end
 end
 
-trusted_networks = trusted_networks - ["127.0.0.1", "::1"]
+trusted_networks -= ["127.0.0.1", "::1"]
 
 template "/etc/spamassassin/local.cf" do
   source "local.cf.erb"
   owner "root"
   group "root"
-  mode 0644
+  mode 0o644
   variables :trusted_networks => trusted_networks.sort
   notifies :restart, "service[spamassassin]"
 end