eximconf: also use GREYLIST_LOCAL_PARTS for greylistd
authorAdam D. Barratt <adam@adam-barratt.org.uk>
Fri, 11 Oct 2019 19:54:25 +0000 (20:54 +0100)
committerAdam D. Barratt <adam@adam-barratt.org.uk>
Fri, 11 Oct 2019 19:54:25 +0000 (20:54 +0100)
In addition to reducing duplication, this also brings the fixes applied
to postgrey support in 82efd346ca1500048366eac43d191c1a2a7d01fc to the
greylistd checks.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
modules/exim/templates/eximconf.erb

index bc6c523..10038ad 100644 (file)
@@ -781,11 +781,7 @@ check_recipient:
   defer
     message  = $sender_host_address is not yet authorized to deliver mail from <$sender_address> to <$local_part@$domain>.
     log_message = greylisted.
-    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}{}}}}
+    local_parts    = GREYLIST_LOCAL_PARTS
     !senders       = :
     !hosts         = : +debianhosts : WHITELIST : \
                      ${if exists {/etc/greylistd/whitelist-hosts}\