From 19eddc708c86a1b18e38e1d3f31cda34788d8789 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Sat, 27 Jul 2013 21:34:28 +0200 Subject: [PATCH] Don't forward to '@' if the user lookup fails --- modules/exim/templates/eximconf.erb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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\ -- 2.20.1