From 9012bc5377524e0a9e8222267b927e2413dd9bcd Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 28 Nov 2013 00:27:41 +0000 Subject: [PATCH 1/1] Disable SMTP callout verification for telenav.com senders 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 | 7 +++++++ .../exim/templates/default/callout_exempt_senders.erb | 1 + cookbooks/exim/templates/default/exim4.conf.erb | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 cookbooks/exim/templates/default/callout_exempt_senders.erb diff --git a/cookbooks/exim/recipes/default.rb b/cookbooks/exim/recipes/default.rb index 61731d8e4..06bc08540 100644 --- a/cookbooks/exim/recipes/default.rb +++ b/cookbooks/exim/recipes/default.rb @@ -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 index 000000000..7dd39ef34 --- /dev/null +++ b/cookbooks/exim/templates/default/callout_exempt_senders.erb @@ -0,0 +1 @@ +*@telenav.com diff --git a/cookbooks/exim/templates/default/exim4.conf.erb b/cookbooks/exim/templates/default/exim4.conf.erb index 81639bce4..3b33facf7 100644 --- a/cookbooks/exim/templates/default/exim4.conf.erb +++ b/cookbooks/exim/templates/default/exim4.conf.erb @@ -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 -- 2.43.2