X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/bdb0740403f851dfe9121638d9e0102507a633ec..19ca76c7c5e79cbb4e497b937376bffcb42d85fc:/cookbooks/exim/recipes/default.rb?ds=inline diff --git a/cookbooks/exim/recipes/default.rb b/cookbooks/exim/recipes/default.rb index e0fd75de3..6af07c8e1 100644 --- a/cookbooks/exim/recipes/default.rb +++ b/cookbooks/exim/recipes/default.rb @@ -115,6 +115,32 @@ file "/etc/exim4/blocked-senders" do mode 0o644 end +if node[:exim][:dkim_selectors] + keys = data_bag_item("exim", "dkim") + + template "/etc/exim4/dkim-selectors" do + owner "root" + source "dkim-selectors.erb" + group "Debian-exim" + mode 0o644 + end + + directory "/etc/exim4/dkim-keys" do + owner "root" + group "Debian-exim" + mode 0o755 + end + + node[:exim][:dkim_selectors].each do |domain, selector| + file "/etc/exim4/dkim-keys/#{domain}" do + content keys[domain].join("\n") + owner "root" + group "Debian-exim" + mode 0o640 + end + end +end + template "/etc/exim4/exim4.conf" do source "exim4.conf.erb" owner "root"