From: Adam D. Barratt Date: Sat, 12 Oct 2019 12:09:07 +0000 (+0100) Subject: eximconf: enable greylisting for users with default options X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=commitdiff_plain;h=08a1906121670d960592fbbf6ec489ff54c8b64c eximconf: enable greylisting for users with default options Signed-off-by: Adam D. Barratt --- diff --git a/modules/exim/templates/eximconf.erb b/modules/exim/templates/eximconf.erb index 10038ade4..bb7c7566c 100644 --- a/modules/exim/templates/eximconf.erb +++ b/modules/exim/templates/eximconf.erb @@ -781,7 +781,11 @@ 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 = GREYLIST_LOCAL_PARTS + condition = ${if or { \ + {match_local_part{$local_part}{GREYLIST_LOCAL_PARTS}} \ + {HAS_DEFAULT_OPTIONS} \ + } \ + } !senders = : !hosts = : +debianhosts : WHITELIST : \ ${if exists {/etc/greylistd/whitelist-hosts}\ @@ -815,7 +819,11 @@ check_recipient: condition = ${if !eq {$acl_m_prf}{PopconMail}} !authenticated = * domains = +handled_domains - local_parts = GREYLIST_LOCAL_PARTS + condition = ${if or { \ + {match_local_part{$local_part}{GREYLIST_LOCAL_PARTS}} \ + {HAS_DEFAULT_OPTIONS} \ + } \ + } set acl_m_pgr = request=smtpd_access_policy\n\ protocol_state=RCPT\n\ protocol_name=${uc:$received_protocol}\n\ @@ -840,7 +848,11 @@ check_recipient: condition = ${if !eq {$acl_m_prf}{PopconMail}} !authenticated = * domains = +handled_domains - local_parts = GREYLIST_LOCAL_PARTS + condition = ${if or { \ + {match_local_part{$local_part}{GREYLIST_LOCAL_PARTS}} \ + {HAS_DEFAULT_OPTIONS} \ + } \ + } condition = ${if eq{${uc:${substr_0_7:$acl_m_pgr}}}{PREPEND}} message = ${sg{$acl_m_pgr}{\N^\w+\s*\N}{}}