Re: [exim] Automatic DROP after many DENY

Góra strony
Delete this message
Reply to this message
Autor: Michael F. Sprague
Data:  
Dla: exim-users
Temat: Re: [exim] Automatic DROP after many DENY
Silmar A. Marca <marca@???> wrote:
> Helo..
>
> I using mutch deny clauses to prevent a spam (callout, spf verification etc..)
> But I need to delay X seconds, and drop the connection after X deny clauses on
> RCPT or other clauses...
>
> In log have multiple RCPTs tentatives without drop....
>
> Example:
> => mail from: sdflksdj@???....
> <= 550 Callout fail sdflksdj@???....
> => mail from: xxxx@???....
> <= 550 Callout fail xxxx@???....
> => mail from: validuser@???....
> => 250 OK
>
> I think to delay 60seconds after 3 deny acl and drop it...
> How to make it?


I have this as my first entry in my RCPT ACL:

#------------------------------------------------------------------------------
# Drop the connection if too many failed recipients.
drop
  condition   = ${if > {${eval:$rcpt_fail_count}}{3}{true}{false}}
  message     = Too many failed recipients - count = $rcpt_fail_count


Thus if there are more than 3 failed recipients given I drop the connection.
If you want to delay too, I think this will work:

#------------------------------------------------------------------------------
# Drop the connection if too many failed recipients.
drop
  condition = ${if > {${eval:$rcpt_fail_count}}{3}{true}{false}}
  delay     = 60s
  message   = Too many failed recipients - count = $rcpt_fail_count


I hope this helps,
mikeS

--
Michael Sprague | mfs@???
System and Network Engineering (SaNE), Inc
use STD::disclaimer;