this should make whitelist, greylist and callout work as expected for virtual domains
authorStephen Gran <steve@lobefin.net>
Tue, 31 Aug 2010 00:31:59 +0000 (01:31 +0100)
committerStephen Gran <steve@lobefin.net>
Tue, 31 Aug 2010 00:31:59 +0000 (01:31 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/exim/templates/eximconf.erb

index 581211b..2bf90c7 100644 (file)
@@ -248,16 +248,16 @@ received_header_text = Received: ${if def:sender_rcvhost {from $sender_rcvhost\n
 # macro definitions.
 # Do not wrap!
 VDOMAINDATA = ${lookup{$domain}partial-lsearch{/etc/exim4/virtualdomains}{$value}}
-WHITELIST = ${if match_domain{$domain}{+virtual_domains}{\
-               ${if exists {/srv/$domain/mail/whitelist}{\
-                ${lookup{$local_part}lsearch{/srv/$domain/mail/whitelist}{$value}{}}\
-                }{}}\
-               }{${lookup{$local_part}lsearch{/etc/exim4/whitelist}{$value}{}} : ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-whitelist}{$value}{}}}}
+WHITELIST = ${if match_domain{$domain}{+virtual_domains}\
+            {${if exists {${extract{directory}{VDOMAINDATA}{${value}/whitelist}}}
+            {${lookup{$local_part}lsearch{${extract{directory}{VDOMAINDATA}{${value}/whitelist}}}{$value}{}}}{}}}\
+            {${lookup{$local_part}lsearch{/etc/exim4/whitelist}{$value}{}}}} : \
+            ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-whitelist}{$value}{}}
 GREYLIST_LOCAL_PARTS = ${if match_domain{$domain}{+virtual_domains}\
-                      {${if exists {${extract{directory}{VDOMAINDATA}{${value}/grey_users}}}\
-                      {${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/grey_users}}}{$local_part}{}}}{}}}\
-                      {${lookup{$local_part}lsearch{/etc/exim4/grey_users}{$local_part}{}} : \
-                      ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-greylist}{$local_part}{}}}}
+                       {${if exists {${extract{directory}{VDOMAINDATA}{${value}/grey_users}}}\
+                       {${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/grey_users}}}{$local_part}{}}}{}}}\
+                       {${lookup{$local_part}lsearch{/etc/exim4/grey_users}{$local_part}{}}}} : \
+                       ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-greylist}{$local_part}{}}
 RT_QUEUE_MAP = /srv/rt.debian.org/mail/rt_queue_map
 
 ######################################################################
@@ -821,11 +821,11 @@ check_recipient:
 
 <%- if nodeinfo['smarthost'].empty? -%>
   deny    domains  = +handled_domains
-          local_parts   = ${if match_domain{$domain}{+virtual_domains}\
-                          {${if exists {${extract{directory}{VDOMAINDATA}{${value}/callout_users}}}\
-                          {${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/callout_users}}}{$local_part}{}}}{}}}\
-                          {${lookup{$local_part}lsearch{/etc/exim4/callout_users}{$local_part}{}} : \
-                          ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-callout}{$local_part}{}}}}
+          local_parts = ${if match_domain{$domain}{+virtual_domains}\
+                        {${if exists {${extract{directory}{VDOMAINDATA}{${value}/callout_users}}}\
+                        {${lookup{$local_part}lsearch*{${extract{directory}{VDOMAINDATA}{${value}/callout_users}}}{$local_part}{}}}{}}}\
+                        {${lookup{$local_part}lsearch{/etc/exim4/callout_users}{$local_part}{}}}} : \
+                        ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-callout}{$local_part}{}}
           !hosts   = +debianhosts : WHITELIST
          !verify  = sender/callout=90s,maxwait=300s