eximconf: log the current rate at which penalised senders are sending
authorAdam D. Barratt <adam@adam-barratt.org.uk>
Fri, 27 Sep 2019 13:37:54 +0000 (14:37 +0100)
committerAdam D. Barratt <adam@adam-barratt.org.uk>
Fri, 27 Sep 2019 13:37:54 +0000 (14:37 +0100)
The use of the "strict" modifier ensures that the count is always updated.
The default "leaky" mode stops updating the count once the limit has
been reached.

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

index 9d29cff..036f717 100644 (file)
@@ -687,6 +687,12 @@ check_recipient:
   deny    condition      = ${if !eq {$acl_m_prf}{PopconMail}}
           !verify        = sender
 
+  warn    !hosts         = +debianhosts
+          condition      = ${if !eq {$acl_m_prf}{PopconMail}}
+          condition      = ${if >{${eval:$acl_c_scr+0}}{0}}
+          ratelimit      = 10 / 60m / per_rcpt / strict / $sender_host_address
+          log_message    = Sender rate $sender_rate / $sender_rate_period (limit: $sender_rate_limit)
+
   defer   !hosts         = +debianhosts
           condition      = ${if !eq {$acl_m_prf}{PopconMail}}
           condition      = ${if >{${eval:$acl_c_scr+0}}{0}}