Rewrite aliases that aren't full addresses
authorTom Hughes <tom@compton.nu>
Wed, 11 Jul 2018 19:35:17 +0000 (20:35 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 11 Jul 2018 19:35:17 +0000 (20:35 +0100)
cookbooks/exim/templates/default/exim4.conf.erb

index 9e285bcf6110336dafb99b1bc1989717c41cbee9..f4db98d06875f4d1c57d22dbff17dac4e811ab48 100644 (file)
@@ -775,7 +775,7 @@ begin retry
 # There are no rewriting specifications in this default configuration file.
 
 begin rewrite
-*@<%= node[:fqdn] %> "${if eq {${lookup{$1}lsearch{/etc/aliases}{yes}{no}}}{no} {$1@openstreetmap.org}fail}" Eh
+*@<%= node[:fqdn] %> "${if !match {${lookup{$1}lsearch{/etc/aliases}{$value}}}{@} {$1@openstreetmap.org}fail}" Eh
 <% node[:exim][:rewrites].each do |rewrite| -%>
 <%= rewrite[:pattern] %> <%= rewrite[:replacement] %> <%= rewrite[:flags] %>
 <% end -%>