From Fail2ban
Revision as of 01:54, 5 January 2014 by Daniel.subs (Talk | contribs) (ASSP filter for Fail2ban)

Jump to: navigation, search

ASSP filter for Fail2ban

Included since fail2ban-0.8.9

If you have an older version grab a copy of the filter from Latest Version or use this version (which is out of date). Place this in the file /etc/fail2ban/filter.d/assp.conf.

# Fail2Ban filter for Anti-Spam SMTP Proxy Server also known as ASSP
#    Honmepage:
#    ProjektSite:


__assp_actions = (?:dropping|refusing)

failregex = ^(:? \[SSL-out\])? <HOST> max sender authentication errors \(\d{,3}\) exceeded -- %(__assp_actions)s connection - after reply: \d{3} \d{1}\.\d{1}.\d{1} Error: authentication failed: \w+;$
                        ^(?: \[SSL-out\])? <HOST> SSL negotiation with client failed: SSL accept attempt failed with unknown error.*:unknown protocol;$
                        ^ Blocking <HOST> - too much AUTH errors \(\d{,3}\);$

Add this section to your /etc/fail2ban/jail.conf file:


enabled  = true
port     = smtp,ssmtp
filter   = assp
action   = iptables[name=ASSP, port=25, protocol=tcp]
logpath  = /var/log/assp/maillog.txt

IMPORTANT: Symlink the logs subdirectory of your ASSP installation as /var/log/assp or change the logpath in your jail configuration to point to ASSP's maillog.txt file.

Don't forget to restart fail2ban.

Check the end of your fail2ban.log whether fail2ban picked up ASSP's log file.