From 82efd346ca1500048366eac43d191c1a2a7d01fc Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Tue, 31 Aug 2010 01:31:59 +0100 Subject: [PATCH] this should make whitelist, greylist and callout work as expected for virtual domains Signed-off-by: Stephen Gran --- modules/exim/templates/eximconf.erb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/exim/templates/eximconf.erb b/modules/exim/templates/eximconf.erb index 581211bb0..2bf90c7c1 100644 --- a/modules/exim/templates/eximconf.erb +++ b/modules/exim/templates/eximconf.erb @@ -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 -- 2.20.1