Disable SMTP callout verification for telenav.com senders
authorTom Hughes <tom@compton.nu>
Thu, 28 Nov 2013 00:27:41 +0000 (00:27 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 28 Nov 2013 00:27:41 +0000 (00:27 +0000)
The telenav.com servers return 550 for any attempt to deliver mail
when the sender address is null, which leads to all mail from them
being rejected due to a failed sender verification.

cookbooks/exim/recipes/default.rb
cookbooks/exim/templates/default/callout_exempt_senders.erb [new file with mode: 0644]
cookbooks/exim/templates/default/exim4.conf.erb

index 61731d8..06bc085 100644 (file)
@@ -81,6 +81,13 @@ template "/etc/exim4/exim4.conf" do
   notifies :restart, "service[exim4]"
 end
 
+template "/etc/exim4/callout_exempt_senders" do
+  source "callout_exempt_senders.erb"
+  owner "root"
+  group "Debian-exim"
+  mode 0644
+end
+
 search(:accounts, "*:*").each do |account|
   name = account["id"]
   details = node[:accounts][:users][name] || {}
diff --git a/cookbooks/exim/templates/default/callout_exempt_senders.erb b/cookbooks/exim/templates/default/callout_exempt_senders.erb
new file mode 100644 (file)
index 0000000..7dd39ef
--- /dev/null
@@ -0,0 +1 @@
+*@telenav.com
index 81639bc..3b33fac 100644 (file)
@@ -1,4 +1,4 @@
-# $Cambridge: exim/exim-src/src/configure.default,v 1.14 2009/10/16 07:46:13 tom Exp $
+# DO NOT EDIT - This file is being maintained by Chef
 
 ######################################################################
 #                  Runtime configuration file for Exim               #
@@ -383,6 +383,10 @@ acl_check_rcpt:
   # Deny incoming mail unless the sender address can be verified.
 
   deny   !hosts         = +relay_from_hosts
+         !verify        = sender
+
+  deny   !hosts         = +relay_from_hosts
+         !senders       = lsearch*@;/etc/exim4/callout_exempt_senders
          !verify        = sender/callout/defer_ok
 
   # Accept if the message comes from one of the hosts for which we are an