From 898c9c328b4a83f6595fc247a0af343c11aca83d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 10 Jul 2018 20:15:05 +0100 Subject: [PATCH] Don't rewrite addresses that are in the aliases file --- cookbooks/exim/templates/default/exim4.conf.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/exim/templates/default/exim4.conf.erb b/cookbooks/exim/templates/default/exim4.conf.erb index fa3346824..9e285bcf6 100644 --- a/cookbooks/exim/templates/default/exim4.conf.erb +++ b/cookbooks/exim/templates/default/exim4.conf.erb @@ -775,7 +775,7 @@ begin retry # There are no rewriting specifications in this default configuration file. begin rewrite -*@<%= node[:fqdn] %> $1@openstreetmap.org Eh +*@<%= node[:fqdn] %> "${if eq {${lookup{$1}lsearch{/etc/aliases}{yes}{no}}}{no} {$1@openstreetmap.org}fail}" Eh <% node[:exim][:rewrites].each do |rewrite| -%> <%= rewrite[:pattern] %> <%= rewrite[:replacement] %> <%= rewrite[:flags] %> <% end -%> -- 2.43.2