]> git.openstreetmap.org Git - chef.git/commitdiff
Configure the mail command to use SMTP instead of sendmail
authorTom Hughes <tom@compton.nu>
Thu, 24 Nov 2022 21:35:34 +0000 (21:35 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 24 Nov 2022 21:36:07 +0000 (21:36 +0000)
cookbooks/exim/recipes/default.rb
cookbooks/exim/templates/default/mail.rc.erb [new file with mode: 0644]

index e8e333b9bcc27da22c72db47b3767d78995e8b43..62b874e2aa173f4979a90a1bcdffa4bfda6e4665 100644 (file)
@@ -25,6 +25,7 @@ package %w[
   exim4
   openssl
   ssl-cert
+  mailutils
 ]
 
 package "exim4-daemon-heavy" do
@@ -211,6 +212,13 @@ remote_directory "/etc/exim4/noreply" do
   purge true
 end
 
+template "/etc/mail.rc" do
+  source "mail.rc.erb"
+  owner "root"
+  group "root"
+  mode "644"
+end
+
 munin_plugin "exim_mailqueue"
 munin_plugin "exim_mailstats"
 
diff --git a/cookbooks/exim/templates/default/mail.rc.erb b/cookbooks/exim/templates/default/mail.rc.erb
new file mode 100644 (file)
index 0000000..253cebb
--- /dev/null
@@ -0,0 +1,3 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+set sendmail="smtp://localhost"