From 2e8d1a75df220af6335d32263a2b3a82ac9760d1 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 3 May 2026 12:48:49 +0100 Subject: [PATCH] Use spamd package for spamassassin --- cookbooks/spamassassin/recipes/default.rb | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/cookbooks/spamassassin/recipes/default.rb b/cookbooks/spamassassin/recipes/default.rb index b9f5aa0bb..c71c26cf7 100644 --- a/cookbooks/spamassassin/recipes/default.rb +++ b/cookbooks/spamassassin/recipes/default.rb @@ -17,15 +17,9 @@ # limitations under the License. # -package "spamassassin" +package "spamd" -service_name = if platform?("debian") || (platform?("ubuntu") && node[:lsb][:release].to_f >= 24.04) - "spamd" - else - "spamassassin" - end - -service service_name do +service "spamd" do action [:enable, :start] supports :status => true, :restart => true, :reload => true end @@ -41,7 +35,7 @@ template "/etc/default/spamassassin" do owner "root" group "root" mode "644" - notifies :restart, "service[#{service_name}]" + notifies :restart, "service[spamd]" end trusted_networks = node[:exim][:relay_from_hosts] @@ -59,7 +53,7 @@ template "/etc/spamassassin/local.pre" do owner "root" group "root" mode "644" - notifies :restart, "service[#{service_name}]" + notifies :restart, "service[spamd]" end template "/etc/spamassassin/local.cf" do @@ -68,7 +62,7 @@ template "/etc/spamassassin/local.cf" do group "root" mode "644" variables :trusted_networks => trusted_networks.sort - notifies :restart, "service[#{service_name}]" + notifies :restart, "service[spamd]" end file "/var/spool/spamassassin/auto_whitelist" do -- 2.39.5