From: Adam D. Barratt Date: Sun, 22 Sep 2019 19:45:31 +0000 (+0100) Subject: eximconf.erb: macroize maximum content scanning message size X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;ds=sidebyside;h=776831bc68efac834cc0226f65e2a4abd3b1327d;p=mirror%2Fdsa-puppet.git eximconf.erb: macroize maximum content scanning message size Signed-off-by: Adam D. Barratt --- diff --git a/modules/exim/templates/eximconf.erb b/modules/exim/templates/eximconf.erb index d8f265a3c..6ce79a48d 100644 --- a/modules/exim/templates/eximconf.erb +++ b/modules/exim/templates/eximconf.erb @@ -254,6 +254,7 @@ received_header_text = Received: ${if def:sender_rcvhost {from $sender_rcvhost\n # macro definitions. # Do not wrap! +MAX_SCAN_SIZE = 256000 VDOMAINDATA = ${lookup{$domain}partial-lsearch{/etc/exim4/virtualdomains}{$value}} VSENDERDOMAINDATA = ${lookup{$sender_address_domain}partial-lsearch{/etc/exim4/virtualdomains}{$value}} WHITELIST = ${if match_domain{$domain}{+virtual_domains}\ @@ -870,13 +871,13 @@ acl_check_mime: accept verify = certificate accept hosts = +debianhosts - discard condition = ${if <{$message_size}{256000}} + discard condition = ${if <{$message_size}{MAX_SCAN_SIZE}} condition = ${if eq {$acl_m_prf}{blackhole}} set acl_m_srb = ${perl{surblspamcheck}} condition = ${if !eq{$acl_m_srb}{false}} log_message = discarded surbl message for $recipients - deny condition = ${if <{$message_size}{256000}} + deny condition = ${if <{$message_size}{MAX_SCAN_SIZE}} condition = ${if !eq {$acl_m_prf}{markup}} condition = ${if !eq {$acl_m_prf}{PopconMail}} set acl_m_srb = ${perl{surblspamcheck}} @@ -884,7 +885,7 @@ acl_check_mime: log_message = $acl_m_srb message = $acl_m_srb - warn condition = ${if <{$message_size}{256000}} + warn condition = ${if <{$message_size}{MAX_SCAN_SIZE}} condition = ${if eq {$acl_m_prf}{markup}} set acl_m_srb = ${perl{surblspamcheck}} condition = ${if !eq{$acl_m_srb}{false}} @@ -980,13 +981,13 @@ check_message: <%- end -%> <%- if @heavy -%> - discard condition = ${if <{$message_size}{256000}} + discard condition = ${if <{$message_size}{MAX_SCAN_SIZE}} condition = ${if eq {$acl_m_prf}{blackhole}} set acl_m_srb = ${perl{surblspamcheck}} condition = ${if !eq{$acl_m_srb}{false}} log_message = discarded surbl message for $recipients - deny condition = ${if <{$message_size}{256000}} + deny condition = ${if <{$message_size}{MAX_SCAN_SIZE}} condition = ${if !eq {$acl_m_prf}{markup}} condition = ${if !eq {$acl_m_prf}{PopconMail}} set acl_m_srb = ${perl{surblspamcheck}} @@ -994,7 +995,7 @@ check_message: log_message = $acl_m_srb message = $acl_m_srb - warn condition = ${if <{$message_size}{256000}} + warn condition = ${if <{$message_size}{MAX_SCAN_SIZE}} condition = ${if eq {$acl_m_prf}{markup}} set acl_m_srb = ${perl{surblspamcheck}} condition = ${if !eq{$acl_m_srb}{false}} @@ -1013,7 +1014,7 @@ check_message: !authenticated = * !verify = certificate !hosts = +debianhosts - condition = ${if <{$message_size}{256000}} + condition = ${if <{$message_size}{MAX_SCAN_SIZE}} spam = pkg_user : true condition = ${if >{$spam_score_int}{59}}