eximconf.erb: macroize maximum content scanning message size
authorAdam D. Barratt <adam@adam-barratt.org.uk>
Sun, 22 Sep 2019 19:45:31 +0000 (20:45 +0100)
committerAdam D. Barratt <adam@adam-barratt.org.uk>
Sun, 22 Sep 2019 19:45:31 +0000 (20:45 +0100)
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
modules/exim/templates/eximconf.erb

index d8f265a..6ce79a4 100644 (file)
@@ -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}}