]> git.openstreetmap.org Git - chef.git/commitdiff
Send wiki mail notifications from a noreply address
authorTom Hughes <tom@compton.nu>
Tue, 20 May 2014 10:37:40 +0000 (11:37 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 20 May 2014 10:38:29 +0000 (11:38 +0100)
cookbooks/exim/attributes/default.rb
cookbooks/exim/files/default/noreply/wiki [new file with mode: 0644]
cookbooks/exim/templates/default/exim4.conf.erb
roles/wiki.rb

index e6e7fff0bde0374ee7665982c9b78e723a78a158..bdd8be4ca6b97801bba30707ad36c62176579427 100644 (file)
@@ -7,3 +7,4 @@ default[:exim][:smarthost_name] = nil
 default[:exim][:smarthost_via] = "mail.openstreetmap.org:26"
 default[:exim][:routes] = { }
 default[:exim][:aliases][:root] = "tomh"
+default[:exim][:rewrites] = [ ]
diff --git a/cookbooks/exim/files/default/noreply/wiki b/cookbooks/exim/files/default/noreply/wiki
new file mode 100644 (file)
index 0000000..f041057
--- /dev/null
@@ -0,0 +1,13 @@
+This is an automated response to your email, which was sent to an
+unattended address.
+
+If you were trying to confirm your email address after signing
+up for a wiki account, or after changing your email address, then
+you should click on the link in the original email you received.
+
+If you are having technical problems with the wiki then please
+contact support@openstreetmap.org for assistance.
+
+Thank you,
+
+OpenStreetMap Administrators
index 41403b04bd31d67a74005d622625fac731ba0eaf..b5360c5844a307a3adeb3aa69c9fb13d6815a2f4 100644 (file)
@@ -760,6 +760,9 @@ begin retry
 # There are no rewriting specifications in this default configuration file.
 
 begin rewrite
+<% node[:exim][:rewrites].each do |rewrite| -%>
+<%= rewrite[:pattern] %> <%= rewrite[:replacement] %> <%= rewrite[:flags] %>
+<% end -%>
 
 
 
index e9f3cb8650a6fbb7e4e3a95fedd7269f2fc2acd9..523e73c52601a61f8488ae2cb74a5712e805ffb1 100644 (file)
@@ -11,7 +11,14 @@ default_attributes(
     :trusted_users => [ "www-data" ],
     :aliases => {
       :root => "grant"
-    }
+    },
+    :rewrites => [
+      {
+        :pattern => "www-data@openstreetmap.org",
+        :replacement => "wiki@noreply.openstreetmap.org",
+        :flags => "F"
+      }
+    ]
   },
   :memcached => {
     :memory_limit => 1024,