
t.baer at dokom
Oct 30, 2009, 11:57 AM
Post #29 of 29
(157 views)
Permalink
|
|
Re: Drop smtp connection before authentication
[In reply to]
|
|
Thanks for your help, Dean. This works really good! Regards Torsten >> Well, the configuration is listed in its entirety below actually. Just >> copy/paste each particular portion into the specified section. >> >> Note that I added the following line into the global section below: >> >> smtp_accept_max_nonmail = 5 >> >> That will limit the number of failed auth attempts per connection and >> the BADAUTH_LIMIT macro sets the number of connections that can fail >> due to failed auth. >> >> How does it work? Essentially, when a connection ends, either the >> check_quit or the check_notquit ACL is executed depending upon whether >> it was a graceful disconnection or not. Either way, if it sees that >> authentication failed in any way, it increments the "badauth" counter >> that is keyed to the sender's IP address. >> >> When a new connection comes in, it checks the counter (without updating it) >> to see if the limit has been hit within the BADAUTH_LIMIT timeframe. >> >> Here is the original config items: >> >> >> In the global config section of your config: >> >> BADAUTH_LIMIT = 15 / 2h >> >> acl_smtp_connect = check_connection >> acl_smtp_quit = check_quit >> acl_smtp_notquit = check_notquit >> smtp_accept_max_nonmail = 5 >> >> In the ACL section of your config: >> >> check_connection: >> drop message = Too many failed authentication attempts >> ratelimit = BADAUTH_LIMIT / noupdate / >> badauth:$sender_host_address >> >> check_quit: >> accept condition = ${if eq{$authentication_failed}{1}} >> ratelimit = BADAUTH_LIMIT / badauth:$sender_host_address >> >> check_notquit: >> accept condition = ${if eq{$authentication_failed}{1}} >> ratelimit = BADAUTH_LIMIT / badauth:$sender_host_address >> > > -- > Dean Brooks > dean[at]iglou.com -- ## List details at http://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
|