From: Tollef Fog Heen Date: Sat, 27 Jul 2013 19:34:28 +0000 (+0200) Subject: Don't forward to '@' if the user lookup fails X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=commitdiff_plain;h=19eddc708c86a1b18e38e1d3f31cda34788d8789 Don't forward to '@' if the user lookup fails --- diff --git a/modules/exim/templates/eximconf.erb b/modules/exim/templates/eximconf.erb index 71cf113de..bafc7d29f 100644 --- a/modules/exim/templates/eximconf.erb +++ b/modules/exim/templates/eximconf.erb @@ -1428,7 +1428,10 @@ virt_users: group = ${extract{group}{VDOMAINDATA}} # Manually construct the forwarding address, preserving the # local_part_suffix if the remote host is master. - data = ${if exists{${extract{directory}{VDOMAINDATA}{${value}/mail-forward.cdb}}}\ + data = ${if and {{exists{${extract{directory}{VDOMAINDATA}{${value}/mail-forward.cdb}}}}\ + {! eq {${lookup{$local_part}cdb\ + {${extract{directory}{VDOMAINDATA}{${value}/mail-forward.cdb}}}}}\ + {}}}\ {${local_part:${lookup{$local_part}cdb\ {${extract{directory}{VDOMAINDATA}{${value}/mail-forward.cdb}}}}}\ ${if eq {${domain:${lookup{$local_part}cdb\