On Wed, Mar 19, 2014 at 11:20:57PM +0100, Patrick Ben Koetter wrote:
> My primary goal would be to detect SASL login attacks/abuse and block the
> client/temporarily disable the account. Catching envelope-sender abuse is
> less important to me.
>
> All this should take place without tailing the log. This has proven to be to
> slow in some installations. At the moment my best guess to reduce the offset
> is to detect potential SASL login abuse during an SMTP session.
There is neither milter nor policy plugin support for reporting
SASL AUTH attempt failure. This requires new code, or the log
tailing you'd like to avoid.
> OTOH if I knew more than one login name had been used and more than one login
> failed within the same session I think I would like to block that IP too.
Blocking the IP is risky, many clients have dynamic IPs or are
behind NAT pools. Rate limiting all SASL auth attempts from a
given IP address, by counting unsuccessful attempts is perhaps
useful, though a determined attacker will employ a botnet to evade
rate limits.
It is not clear there is any effective action you can take. You're
likely better off dictionary attacking your own user passwords
offline, before the bad guys do it online and should block the
creation of easily guessed passwords. Proactively rate limit email
from users whose password is weak, and work with them to change
it.
--
Viktor.