Filter library
fail2ban filters for mail servers and webmail
20 built-in filters, each with its jail block, exact regex, real log lines and a test link.
Postfix and Dovecot have their own guide. This page covers every other mail-related filter that ships with fail2ban 1.1.1: MTAs such as Exim and Sendmail, IMAP/POP3 servers, and webmail front ends. For each one you get the jail block to enable it, the exact regexes, log lines it catches and a one-click test in the regex tester.
| Filter | Service | Jail |
|---|---|---|
oracleims | Oracle Communications Messaging Server | oracleims |
assp | ASSP anti-spam SMTP proxy | assp |
courier-auth | Courier IMAP/POP3 | courier-auth |
courier-smtp | Courier MTA | courier-smtp |
cyrus-imap | Cyrus IMAP | cyrus-imap |
domino-smtp | HCL/IBM Domino SMTP | domino-smtp |
exim | Exim MTA | exim |
exim-spam | Exim MTA | exim-spam |
horde | Horde webmail | horde |
kerio | Kerio Connect | kerio |
openwebmail | OpenWebMail | openwebmail |
perdition | Perdition IMAP/POP3 proxy | perdition |
qmail | qmail | qmail-rbl |
roundcube-auth | Roundcube webmail | roundcube-auth |
sendmail-auth | Sendmail | sendmail-auth |
sendmail-reject | Sendmail | sendmail-reject |
sogo-auth | SOGo groupware | sogo-auth |
solid-pop3d | solid-pop3d | solid-pop3d |
squirrelmail | SquirrelMail | squirrelmail |
uwimap-auth | UW IMAP | uwimap-auth |
Enable a jail by adding its block to /etc/fail2ban/jail.local, then run sudo fail2ban-client reload. If the service logs only to the systemd journal, add backend = systemd; if your distribution's default backend is systemd (Ubuntu 24.04, Debian 13) and the service writes a log file, add backend = auto. More in backends and the jail.local example.
oracleims Oracle Communications Messaging Server
The oracleims filter bans failed authentication in Oracle IMS XML logs. File: /etc/fail2ban/filter.d/oracleims.conf; jail [oracleims]; log on Debian/Ubuntu: /opt/sun/comms/messaging64/log/mail.log_current.
[oracleims]
enabled = true
logpath = /opt/sun/comms/messaging64/log/mail.log_current
banaction = %(banaction_allports)sLog lines it bans (from fail2ban's test suite):
<co ts="2014-06-02T16:06:33.99" pi="72aa.17f0.25622" sc="tcp_local" dr="+" ac="U" tr="TCP|192.245.12.223|25|89.96.245.78|4299" ap="SMTP" mi="Bad password" us="nic@transcend.com" di="535 5.7.8 Bad username or password (Authentication failed)."/><co ts="2014-06-02T10:08:07.56" pi="123f.8e2.9022" sc="tcp_local" dr="+" ac="U" tr="TCP|192.245.12.223|25|71.95.206.106|56591" ap="SMTP" mi="Bad password" us="romeo.julieta@opus1.com" di="535 5.7.8 Bad username or password (Authentication failed)."/><co ts="2014-06-02T09:54:58.82" pi="123f.715.7116" sc="tcp_local" dr="+" ac="U" tr="TCP|192.245.12.223|25|151.1.71.144|58406" ap="SMTP" mi="Bad password" us="01ko8hqnoif09qx0np@imap.opus1.com" di="535 5.7.8 Bad username or password (Authentication failed)."/>
Show the failregex fail2ban compiles (1 line)
tr="[A-Z]+\|[0-9.]+\|\d+\|<HOST>\|\d+" ap="[^"]*" mi="Bad password" us="[^"]*" di="535 5.7.8 Bad username or password( \(Authentication failed\))?\."/>$Test oracleims in the browser or on the server: sudo fail2ban-regex /opt/sun/comms/messaging64/log/mail.log_current oracleims · source
assp ASSP anti-spam SMTP proxy
The assp filter bans hosts that ASSP rejects for SMTP abuse. File: /etc/fail2ban/filter.d/assp.conf; jail [assp]; log on Debian/Ubuntu: /root/path/to/assp/logs/maillog.txt.
[assp]
enabled = true
port = smtp,465,submission
logpath = /root/path/to/assp/logs/maillog.txtLog lines it bans (from fail2ban's test suite):
Apr-07-13 07:08:36 [SSL-out] 68.171.223.68 SSL negotiation with client failed: SSL accept attempt failed with unknown errorerror:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol;Apr-07-13 07:08:36 [SSL-out] 68.171.223.68 SSL negotiation with client failed: SSL accept attempt failed with unknown errorerror:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol;Apr-07-13 07:10:37 [SSL-out] 68.171.223.68 SSL negotiation with client failed: SSL accept attempt failed with unknown errorerror:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol;Apr-07-13 07:12:37 [SSL-out] 68.171.223.68 SSL negotiation with client failed: SSL accept attempt failed with unknown errorerror:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol;Apr-07-13 07:14:36 [SSL-out] 68.171.223.68 SSL negotiation with client failed: SSL accept attempt failed with unknown errorerror:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol;
Show the failregex fail2ban compiles (5 lines)
^(:? \[SSL-out\])? <HOST> max sender authentication errors \(\d{,3}\) exceeded -- (?:dropping|refusing) 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}\);$
^\s*(?:[\w\-]+\s+)*(?:\[\S+\]\s+)*<HOST> (?:\<\S+@\S+\.\S+\> )*(?:to: \S+@\S+\.\S+ )*relay attempt blocked for(?: \(parsing\))?: \S+$
^\s*(?:[\w\-]+\s+)*(?:\[\S+\]\s+)*<HOST> \[SMTP Error\] 535 5\.7\.8 Error: authentication failed:\s+(?:\S+|Connection lost to authentication server|Invalid authentication mechanism|Invalid base64 data in continued response)?$Test assp in the browser or on the server: sudo fail2ban-regex /root/path/to/assp/logs/maillog.txt assp · source
courier-auth Courier IMAP/POP3
The courier-auth filter bans failed IMAP and POP3 logins on Courier. File: /etc/fail2ban/filter.d/courier-auth.conf; jail [courier-auth]; log on Debian/Ubuntu: /var/log/mail.log.
[courier-auth]
enabled = true
port = smtp,465,submission,imap,imaps,pop3,pop3s
logpath = %(syslog_mail)s
backend = %(syslog_backend)sLog lines it bans (from fail2ban's test suite):
Apr 23 21:59:01 dns2 imapd: LOGIN FAILED, user=sales@example.com, ip=[::ffff:1.2.3.4]Apr 23 21:59:38 dns2 pop3d: LOGIN FAILED, user=info@example.com, ip=[::ffff:198.51.100.76]Nov 13 08:11:53 server imapd-ssl: LOGIN FAILED, user=user@domain.tld, ip=[::ffff:198.51.100.33]Apr 17 19:17:11 SERVER courierpop3login: LOGIN FAILED, user=USER@EXAMPLE.org, ip=[::ffff:1.2.3.4]Apr 17 19:17:12 server imapd-ssl: LOGIN FAILED, method=PLAIN, ip=[::ffff:192.0.2.4]
Show the failregex fail2ban compiles (1 line)
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?(?:courier)?(?:imapd?|pop3d?)(?:login)?(?:-ssl)?(?:\(\S+\))?[\]\)]?:?|[\[\(]?(?:courier)?(?:imapd?|pop3d?)(?:login)?(?:-ssl)?(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?LOGIN FAILED, (?:(?!ip=)(?:user=<F-USER>[^,]*</F-USER>|\w+=[^,]*), )*ip=\[<HOST>\]Test courier-auth in the browser or on the server: sudo fail2ban-regex /var/log/mail.log courier-auth · source
courier-smtp Courier MTA
The courier-smtp filter bans relay attempts and failed SMTP authentication on Courier. File: /etc/fail2ban/filter.d/courier-smtp.conf; jail [courier-smtp]; log on Debian/Ubuntu: /var/log/mail.log.
[courier-smtp]
enabled = true
port = smtp,465,submission
logpath = %(syslog_mail)s
backend = %(syslog_backend)sLog lines it bans (from fail2ban's test suite):
Apr 10 03:47:57 web courieresmtpd: error,relay=::ffff:1.2.3.4,ident=tmf,from=<tmf@example.com>,to=<mailman-subscribe@example.com>: 550 User unknown.Jul 3 23:07:20 szerver courieresmtpd: error,relay=::ffff:1.2.3.4,msg="535 Authentication failed.",cmd: YWRvYmVhZG9iZQ==Jul 4 18:39:39 mail courieresmtpd: error,relay=::ffff:1.2.3.4,from=<picaro@astroboymail.com>,to=<user@update.net>: 550 User <benny> unknownJul 6 03:42:28 whistler courieresmtpd: error,relay=::ffff:1.2.3.4,from=<>,to=<admin at memcpy>: 550 User unknown.Nov 21 23:16:17 server courieresmtpd: error,relay=::ffff:1.2.3.4,from=<>,to=<>: 550 User unknown.
Show the failregex fail2ban compiles (2 lines)
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?courieresmtpd(?:\(\S+\))?[\]\)]?:?|[\[\(]?courieresmtpd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?error,relay=<HOST>,(?:port=\d+,)?<F-CONTENT>.+</F-CONTENT>$^[^:]*: 550 User (<.*> )?unknown\.?$
^msg="535 Authentication failed\.",cmd:( AUTH \S+)?( [0-9a-zA-Z\+/=]+)?(?: \S+)$Test courier-smtp in the browser or on the server: sudo fail2ban-regex /var/log/mail.log courier-smtp · source
cyrus-imap Cyrus IMAP
The cyrus-imap filter bans failed IMAP/POP3 authentication on a Cyrus server. File: /etc/fail2ban/filter.d/cyrus-imap.conf; jail [cyrus-imap]; log on Debian/Ubuntu: /var/log/mail.log.
[cyrus-imap]
enabled = true
port = imap,imaps
logpath = %(syslog_mail)s
backend = %(syslog_backend)sLog lines it bans (from fail2ban's test suite):
Jan 4 21:51:05 hostname cyrus/imap[5355]: badlogin: localhost.localdomain [127.0.0.1] plaintext cyrus@localdomain SASL(-13): authentication failure: checkpass failedJan 4 21:51:05 hostname cyrus/imaps[5355]: badlogin: localhost.localdomain [127.0.0.1] plaintext cyrus@localdomain SASL(-13): authentication failure: checkpass failedFeb 20 17:23:32 domain cyrus/pop3[18635]: badlogin: localhost [198.51.100.23] plaintext administrator SASL(-13): authentication failure: checkpass failedFeb 20 17:23:32 cyrus/pop3[4297]: badlogin: example.com [1.2.3.4] plaintext mail0001 SASL(-13): authentication failure: checkpass failedJun 8 18:11:13 lampserver imap[4480]: badlogin: example.com [198.51.100.45] DIGEST-MD5 [SASL(-13): authentication failure: client response doesn't match what we generated]
Show the failregex fail2ban compiles (1 line)
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?(?:cyrus/)?(?:imap(d|s)?|pop3(d|s)?)(?:\(\S+\))?[\]\)]?:?|[\[\(]?(?:cyrus/)?(?:imap(d|s)?|pop3(d|s)?)(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?badlogin: [^\[]*\[<HOST>\] \S+ .*?\[?SASL\(-13\): (authentication failure|user not found): .*\]?$Test cyrus-imap in the browser or on the server: sudo fail2ban-regex /var/log/mail.log cyrus-imap · source
domino-smtp HCL/IBM Domino SMTP
The domino-smtp filter bans failed SMTP authentication on a Domino server. File: /etc/fail2ban/filter.d/domino-smtp.conf; jail [domino-smtp]; log on Debian/Ubuntu: /home/domino01/data/IBM_TECHNICAL_SUPPORT/console.log.
[domino-smtp]
enabled = true
port = smtp,ssmtp
logpath = /home/domino01/data/IBM_TECHNICAL_SUPPORT/console.logLog lines it bans (from fail2ban's test suite):
03-07-2005 23:07:20 SMTP Server: Authentication failed for user postmaster ; connecting host 1.2.3.4[28325:00010-3735542592] 22-06-2014 09:56:12 smtp: postmaster [1.2.3.4] authentication failure using internet password08-09-2014 06:14:27 smtp: postmaster [1.2.3.4] authentication failure using internet password2016-11-07 22:21:20 smtp: postmaster [1.2.3.4] authentication failure using internet password2016-11-07 22:21:21 smtp: user with space in name [192.0.2.4] authentication failure using internet password
Show the failregex fail2ban compiles (3 lines)
^(?:\[[^\]]+\])?\s*SMTP Server(?::|\s+\[[^\]]+\]) Authentication failed for user .*? \; connecting host \[?<ADDR>\]?$
^(?:\[[^\]]+\])?\s*smtp: (?:<F-USER>(?:[^\[ ]+ )*[^\[ ]+</F-USER> )?\[?<ADDR>\]? authentication failure using internet password\s*$
^(?:\[[^\]]+\])?\s*SMTP Server(?::|\s+\[[^\]]+\]) Connection from \[?<ADDR>\]? rejected for policy reasons\.Test domino-smtp in the browser or on the server: sudo fail2ban-regex /home/domino01/data/IBM_TECHNICAL_SUPPORT/console.log domino-smtp · source
exim Exim MTA
The exim filter bans hosts with failed SMTP auth, relay attempts and rejected recipients in Exim's main log. File: /etc/fail2ban/filter.d/exim.conf; jail [exim]; log on Debian/Ubuntu: /var/log/exim4/mainlog; modes: aggressive, more, normal.
[exim]
enabled = true
port = smtp,465,submission
logpath = %(exim_main_log)sLog lines it bans (from fail2ban's test suite):
2013-01-04 17:03:46 login authenticator failed for rrcs-24-106-174-74.se.biz.rr.com ([192.168.2.33]) [24.106.174.74]: 535 Incorrect authentication data (set_id=brian)2013-06-12 03:57:58 login authenticator failed for (ylmf-pc) [120.196.140.45]: 535 Incorrect authentication data: 1 Time(s)2013-06-12 13:18:11 login authenticator failed for (USER-KVI9FGS9KP) [101.66.165.86]: 535 Incorrect authentication data2013-08-20 07:48:02 login authenticator failed for static-ip-85-25-92-177.inaddr.ip-pool.com (USER) [85.25.92.177]: 535 Incorrect authentication data: 1 Time(s)2013-08-20 23:30:05 plain authenticator failed for ([192.168.2.102]) [91.218.72.71]: 535 Incorrect authentication data: 1 Time(s)
Show the failregex fail2ban compiles (1 line)
^(?:\s?\[\d+\]|\s?[\w\.-]+ exim\[\d+\]:){0,2}<F-CONTENT>.+</F-CONTENT>$^\s?\w+ authenticator failed for(?: (?!H=)[A-Za-z]{1,4}(?:=\S+)?)* (?:H=)?(?:[\w.-]+)? ?(?:\(\S+\))? ?\[<ADDR>\](?::\d+)?(?: (?!H=)[A-Za-z]{1,4}(?:=\S+)?)*: 535 Incorrect authentication data(?: \(set_id=.*\)|: \d+ Time\(s\))?\s*$Test exim in the browser or on the server: sudo fail2ban-regex /var/log/exim4/mainlog exim · source
exim-spam Exim MTA
The exim-spam filter bans hosts whose mail Exim rejected as spam (SpamAssassin, honeypot addresses). File: /etc/fail2ban/filter.d/exim-spam.conf; jail [exim-spam]; log on Debian/Ubuntu: /var/log/exim4/mainlog.
[exim-spam]
enabled = true
port = smtp,465,submission
logpath = %(exim_main_log)sLog lines it bans (from fail2ban's test suite):
2004-01-18 07:15:35 1Ai79e-0000Dq-8i F=uzwltcmwto24@melissacam.biz H=lsanca1-ar3-4-47-028-040.lsanca1.elnk.dsl.genuity.net [4.47.28.40] P=smtp rejected by local_scan(): Rejected: hits=7.5 required=5.0 trigger=5.02013-06-15 11:19:33 [2249] H=([2.181.148.95]) [2.181.148.95]:52391 I=[1.2.3.4]:25 F=fantasizesg4@google.com rejected RCPT some@email.com: rejected found in dnsbl zen.spamhaus.org2013-06-09 10:21:28 [14127] 1UlasQ-0003fr-45 F=mcorporation4@aol.com H=(mail38.fssprus.ru) [46.254.240.82]:43671 I=[1.2.3.4]:25 P=esmtp rejected by local_scan(): Rejected2013-06-15 11:20:36 [2516] 1Unmew-0000ea-SE H=egeftech.static.otenet.gr [83.235.177.148]:32706 I=[1.2.3.4]:25 F=auguriesvbd40@google.com rejected after DATA: This message contains a virus (Sanesecurity.Junk.39934.UNOFFICIAL).2013-06-16 02:50:43 H=dbs.marsukov.com [111.67.203.114] F=<trudofspiori@mail.ru> rejected RCPT <info@nanomedtech.ua>: rejected because 111.67.203.114 is in a black list at dnsbl.sorbs.net\nCurrently Sending Spam See: http://www.sorbs.net/lookup.shtml?111.67.203.114
Show the failregex fail2ban compiles (5 lines)
^(?:\s?\[\d+\]|\s?[\w\.-]+ exim\[\d+\]:){0,2}<F-CONTENT>.+</F-CONTENT>$^\s?\S+(?: (?!H=)[A-Za-z]{1,4}(?:=\S+)?)* (?:H=)?(?:[\w.-]+)? ?(?:\(\S+\))? ?\[<ADDR>\](?::\d+)?(?: (?!H=)[A-Za-z]{1,4}(?:=\S+)?)* rejected by local_scan\(\): .{0,256}$
^(?: (?!H=)[A-Za-z]{1,4}(?:=\S+)?)* (?:H=)?(?:[\w.-]+)? ?(?:\(\S+\))? ?\[<ADDR>\](?::\d+)?(?: (?!H=)[A-Za-z]{1,4}(?:=\S+)?)* rejected RCPT [^@]+@\S+: .*dnsbl.*\s*$
^\s?\S+(?: (?!H=)[A-Za-z]{1,4}(?:=\S+)?)* (?:H=)?(?:[\w.-]+)? ?(?:\(\S+\))? ?\[<ADDR>\](?::\d+)?(?: (?!H=)[A-Za-z]{1,4}(?:=\S+)?)* rejected after DATA: This message contains a virus \(\S+\)\.\s*$
^\s?\S+ SA: Action: flagged as Spam but accepted: score=\d+\.\d+ required=\d+\.\d+ \(scanned in \d+/\d+ secs \| Message-Id: \S+\)\. From \S+ \(host=\S+ \[<HOST>\]\) for trap@example.com$
^\s?\S+ SA: Action: silently tossed message: score=\d+\.\d+ required=\d+\.\d+ trigger=\d+\.\d+ \(scanned in \d+/\d+ secs \| Message-Id: \S+\)\. From \S+ \(host=(\S+ )?\[<HOST>\]\) for \S+$Test exim-spam in the browser or on the server: sudo fail2ban-regex /var/log/exim4/mainlog exim-spam · source
horde Horde webmail
The horde filter bans failed logins to Horde webmail. File: /etc/fail2ban/filter.d/horde.conf; jail [horde]; log on Debian/Ubuntu: /var/log/horde/horde.log.
[horde]
enabled = true
port = http,https
logpath = /var/log/horde/horde.logLog lines it bans (from fail2ban's test suite):
Nov 11 18:57:57 HORDE [error] [horde] FAILED LOGIN for graham [203.16.208.190] to Horde [on line 116 of "/home/ace-hosting/public_html/horde/login.php"]Dec 15 08:59:59 HORDE [error] [imp] FAILED LOGIN for emai.user@somedomain.com [1.2.3.4] to {mx.somedomain.com:993 [imap/ssl/novalidate-cert]} [pid 68394 on line 139 of /usr/local/www/www.somedomain.com/public_html/horde/imp/lib/Auth/imp.php"]
Show the failregex fail2ban compiles (1 line)
^ HORDE \[error\] \[(horde|imp)\] FAILED LOGIN for \S+ \[<HOST>\](\(forwarded for \[\S+\]\))? to (Horde|{[^}]+}) \[(pid \d+ )?on line \d+ of \S+\]$Test horde in the browser or on the server: sudo fail2ban-regex /var/log/horde/horde.log horde · source
kerio Kerio Connect
The kerio filter bans hosts that Kerio Connect flags for SMTP spam, relay or auth failures. File: /etc/fail2ban/filter.d/kerio.conf; jail [kerio]; log on Debian/Ubuntu: /opt/kerio/mailserver/store/logs/security.log.
[kerio]
enabled = true
port = imap,smtp,imaps,465
logpath = /opt/kerio/mailserver/store/logs/security.logLog lines it bans (from fail2ban's test suite):
[17/Jun/2011 17:00:45] Attempt to deliver to unknown recipient <advertise@aplawrence.com>, from <bekytnabvnvyx@aapug.org>, IP address 200.90.149.178[18/Jan/2014 06:41:25] SMTP Spam attack detected from 202.169.236.195, client closed connection before SMTP greeting[18/Jan/2014 06:42:12] SMTP Spam attack detected from 115.147.104.13, client sent data before SMTP greeting[18/Jan/2014 05:47:17] IP address 112.140.49.130 found in DNS blacklist UCEProtect1, mail from <infootransac@yahoo.com.hk> to <advertise@aplawrence.com>[18/Jan/2014 06:39:44] IP address 91.232.105.66 found in DNS blacklist BarracudaCentral, mail from <postmaster@ponetn.us> to <advertise@aplawrence.com>
Show the failregex fail2ban compiles (9 lines)
^ SMTP Spam attack detected from <HOST>,
^ IP address <HOST> found in DNS blacklist
^ Relay attempt from IP address <HOST>
^ Attempt to deliver to unknown recipient \S+, from \S+, IP address <HOST>$
^ Failed SMTP login from <HOST>
^ SMTP: User \S+ doesn't exist. Attempt from IP address <HOST>
^ Client with IP address <HOST> has no reverse DNS entry, connection rejected before SMTP greeting$
^ Administration login into Web Administration from <HOST> failed: IP address not allowed$
^ Message from IP address <HOST>, sender \S+ rejected: sender domain does not exist$Test kerio in the browser or on the server: sudo fail2ban-regex /opt/kerio/mailserver/store/logs/security.log kerio · source
openwebmail OpenWebMail
The openwebmail filter bans failed logins to OpenWebMail. File: /etc/fail2ban/filter.d/openwebmail.conf; jail [openwebmail]; log on Debian/Ubuntu: /var/log/openwebmail.log.
[openwebmail]
enabled = true
port = http,https
logpath = /var/log/openwebmail.logLog lines it bans (from fail2ban's test suite):
Sat Dec 28 19:03:53 2013 - [72926] (178.123.108.196) gsdfg - userinfo error - auth_unix.pl, ret -4, User gsdfg doesn't existSat Dec 28 19:04:03 2013 - [72926] (178.123.108.196) gsdfg - login error - no such user - loginname=gsdfgSat Dec 28 19:05:38 2013 - [73540] (178.123.108.196) myname - login error - auth_unix.pl, ret -4, Password incorrect
Show the failregex fail2ban compiles (2 lines)
^ - \[\d+\] \(<HOST>\) (?P<USER>\S+) - login error - (no such user - loginname=(?P=USER)|auth_unix.pl, ret -4, Password incorrect)$
^ - \[\d+\] \(<HOST>\) (?P<USER>\S+) - userinfo error - auth_unix.pl, ret -4, User (?P=USER) doesn't exist$Test openwebmail in the browser or on the server: sudo fail2ban-regex /var/log/openwebmail.log openwebmail · source
perdition Perdition IMAP/POP3 proxy
The perdition filter bans failed logins through the Perdition mail proxy. File: /etc/fail2ban/filter.d/perdition.conf; jail [perdition]; log on Debian/Ubuntu: /var/log/mail.log.
[perdition]
enabled = true
port = imap,imaps,pop3,pop3s
logpath = %(syslog_mail)s
backend = %(syslog_backend)sLog lines it bans (from fail2ban's test suite):
Jul 18 16:07:18 ares perdition.imaps[3194]: Auth: 192.168.8.100:2274->193.48.191.9:993 client-secure=ssl authorisation_id=NONE authentication_id="carles" server="imap.biotoul.fr:993" protocol=IMAP4S server-secure=ssl status="failed: Re-Authentication Failure"Jul 18 16:08:58 ares perdition.imaps[3194]: Fatal Error reading authentication information from client 192.168.8.100:2274->193.48.191.9:993: Exiting child
Show the failregex fail2ban compiles (2 lines)
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?perdition.\S+(?:\(\S+\))?[\]\)]?:?|[\[\(]?perdition.\S+(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?Auth: <HOST>:\d+->(\d{1,3}\.){3}\d{1,3}:\d+ client-secure=\S+ authorisation_id=NONE authentication_id=".+" server="\S+" protocol=\S+ server-secure=\S+ status="failed: (local authentication failure|Re-Authentication Failure)"$
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?perdition.\S+(?:\(\S+\))?[\]\)]?:?|[\[\(]?perdition.\S+(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?Fatal Error reading authentication information from client <HOST>:\d+->(\d{1,3}\.){3}\d{1,3}:\d+: Exiting child$Test perdition in the browser or on the server: sudo fail2ban-regex /var/log/mail.log perdition · source
qmail qmail
The qmail filter bans hosts rejected by qmail's RBL check. File: /etc/fail2ban/filter.d/qmail.conf; jail [qmail-rbl]; log on Debian/Ubuntu: /service/qmail/log/main/current.
[qmail-rbl]
enabled = true
filter = qmail
port = smtp,465,submission
logpath = /service/qmail/log/main/currentLog lines it bans (from fail2ban's test suite):
Sep 6 07:33:33 sd6 qmail: 1157520813.485077 rblsmtpd: 198.51.100.77 pid 19597 sbl-xbl.spamhaus.org: 451 http://www.spamhaus.org/query/bl?ip=198.51.100.77Sep 6 07:18:29 sd6 qmail: 1157519909.633171 qmail-smtpd: 421 badiprbl: ip 198.51.100.54 rbl: example.comJun 30 15:13:33 ns1 rblsmtpd: relays.ordb.org blocked 193.111.120.47 ordb-test.null.dk -Jun 30 15:13:55 ns1 rblsmtpd: relays.osirusoft.com blocked 192.203.178.107 sbl.crynwr.com -
Show the failregex fail2ban compiles (3 lines)
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?(?:qmail|rblsmtpd)(?:\(\S+\))?[\]\)]?:?|[\[\(]?(?:qmail|rblsmtpd)(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?\d+\.\d+ rblsmtpd: <HOST> pid \d+ \S+ 4\d\d \S+\s*$
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?(?:qmail|rblsmtpd)(?:\(\S+\))?[\]\)]?:?|[\[\(]?(?:qmail|rblsmtpd)(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?\d+\.\d+ qmail-smtpd: 4\d\d badiprbl: ip <HOST> rbl: \S+\s*$
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?(?:qmail|rblsmtpd)(?:\(\S+\))?[\]\)]?:?|[\[\(]?(?:qmail|rblsmtpd)(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?\S+ blocked <HOST> \S+ -\s*$Test qmail in the browser or on the server: sudo fail2ban-regex /service/qmail/log/main/current qmail · source
roundcube-auth Roundcube webmail
The roundcube-auth filter bans failed logins to Roundcube webmail. File: /etc/fail2ban/filter.d/roundcube-auth.conf; jail [roundcube-auth]; log on Debian/Ubuntu: /var/log/roundcube/errors.log.
[roundcube-auth]
enabled = true
port = http,https
logpath = %(roundcube_errors_log)sLog lines it bans (from fail2ban's test suite):
[22-Jan-2013 22:28:21 +0200]: FAILED login for user1 from 192.0.43.10May 26 07:12:40 hamster roundcube: IMAP Error: Login failed for sales@example.com from 10.1.1.47Jul 11 03:06:37 myhostname roundcube: IMAP Error: Login failed for admin from 1.2.3.4. AUTHENTICATE PLAIN: A0002 NO Login failed. in /usr/share/roundcube/program/include/rcube_imap.php on line 205 (POST /wmail/?_task=login&_action=login)Jul 11 03:06:37 myhostname roundcube: IMAP Error: Login failed for admin from 127.0.0.1 from 1.2.3.4. AUTHENTICATE PLAIN: A0002 NO Login failed. in /usr/share/roundcube/program/include/rcube_imap.php on line 205 (POST /wmail/?_task=login&_action=login)Jul 11 03:06:37 myhostname roundcube: IMAP Error: Login failed for admin from 127.0.0.1. from 1.2.3.4. AUTHENTICATE PLAIN: A0002 NO Login failed. in /usr/share/roundcube/program/include/rcube_imap.php on line 205 (POST /wmail/?_task=login&_action=login)
Show the failregex fail2ban compiles (1 line)
^\s*(\[\])?(\S+\s*(?:roundcube(?:\[(\d*)\])?:)?\s*(<[\w]+>)? IMAP Error)?: (?:<[\w]+> )?<F-CONTENT>.+</F-CONTENT>$^(?:Login failed|(?i:Failed) login) for <F-USER>(?:(?P<simple>\S+)|.*)</F-USER> (?:against \S+ )?from <ADDR>(?:(?:\([^\)]*\))?\.(?! from ) (?(simple)(?:\S+(?! from ) )*|(?:(?! from ).)*(?: user=(?P=user))? )in \S+\.php on line \d+| in session \w+)?(?: \([^\)]*\))?$Test roundcube-auth in the browser or on the server: sudo fail2ban-regex /var/log/roundcube/errors.log roundcube-auth · source
sendmail-auth Sendmail
The sendmail-auth filter bans failed SMTP AUTH attempts on Sendmail. File: /etc/fail2ban/filter.d/sendmail-auth.conf; jail [sendmail-auth]; log on Debian/Ubuntu: /var/log/mail.log.
[sendmail-auth]
enabled = true
port = submission,465,smtp
logpath = %(syslog_mail)s
backend = %(syslog_backend)sLog lines it bans (from fail2ban's test suite):
Feb 16 23:33:20 smtp1 sm-mta[5133]: s1GNXHYB005133: [190.5.230.178]: possible SMTP attack: command=AUTH, count=5Feb 16 23:40:36 smtp1 sm-mta[5178]: s1GNeNqe005178: cpe-075-176-164-191.sc.res.rr.com [75.176.164.191]: possible SMTP attack: command=AUTH, count=5Feb 24 12:10:15 kismet sm-acceptingconnections[32053]: s1OHA28u032053: 211-75-6-133.HINET-IP.hinet.net [211.75.6.133]: possible SMTP attack: command=AUTH, count=6Feb 24 13:00:17 kismet sm-acceptingconnections[1499]: s1OHxxSn001499: 192.241.70.95.dsl.static.turk.net [95.70.241.192] (may be forged): possible SMTP attack: command=AUTH, count=6Feb 24 14:00:00 server sendmail[26592]: u0CB32qX026592: [192.0.2.1]: possible SMTP attack: command=AUTH, count=5
Show the failregex fail2ban compiles (2 lines)
^<F-MLFID>(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?(?:sendmail|sm-(?:mta|acceptingconnections))(?:\(\S+\))?[\]\)]?:?|[\[\(]?(?:sendmail|sm-(?:mta|acceptingconnections))(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?(?:\w{14,20}: )?</F-MLFID><F-CONTENT>.+</F-CONTENT>$^(\S+ )?\[(?:IPv6:<IP6>|<IP4>)\]( \(may be forged\))?: possible SMTP attack: command=AUTH, count=\d+$
^AUTH failure \([^\)]+\):(?: [^:]+:)? (?:authentication failure|user not found): [^,]*, (?:user=<F-USER>(?:\S+|.*?)</F-USER>, )?relay=(?:\S+ )?\[(?:IPv6:<IP6>|<IP4>)\](?: \(may be forged\))?$Test sendmail-auth in the browser or on the server: sudo fail2ban-regex /var/log/mail.log sendmail-auth · source
sendmail-reject Sendmail
The sendmail-reject filter bans hosts Sendmail rejected for relaying, unknown users or bad HELO. File: /etc/fail2ban/filter.d/sendmail-reject.conf; jail [sendmail-reject]; log on Debian/Ubuntu: /var/log/mail.log; modes: aggressive, extra, normal.
[sendmail-reject]
enabled = true
port = smtp,465,submission
logpath = %(syslog_mail)s
backend = %(syslog_backend)sLog lines it bans (from fail2ban's test suite):
Feb 25 03:01:10 kismet sm-acceptingconnections[27713]: s1P819mk027713: ruleset=check_rcpt, arg1=<asservnew@freemailhost.ru>, relay=128-68-136-133.broadband.corbina.ru [128.68.136.133], reject=550 5.7.1 <asservnew@freemailhost.ru>... Relaying denied. Proper authentication required.Feb 23 21:36:14 petermurray sm-mta[22248]: s1NLaDQT022248: ruleset=check_rcpt, arg1=<dautareuk2@hotmail.it>, relay=int0.client.access.azadnet.net [80.253.155.119] (may be forged), reject=550 5.7.1 <dautareuk2@hotmail.it>... Relaying denied. IP name possibly forged [80.253.155.119]Feb 24 07:33:59 petermurray sm-mta[21134]: s1O7XtZJ021134: ruleset=check_rcpt, arg1=<sanjinn232@yahoo.com.tw>, relay=118-161-66-57.dynamic.hinet.net [118.161.66.57], reject=550 5.7.1 <sanjinn232@yahoo.com.tw>... Relaying denied. Proper authentication required.Feb 23 07:57:28 petermurray sm-mta[6519]: s1N7vR47006519: ruleset=check_rcpt, arg1=<camila.pinto@camilopinto.pt>, relay=[2.180.185.27], reject=553 5.1.8 <camila.pinto@camilopinto.pt>... Domain of sender address camila.pinto@andrewweitzman.com does not existFeb 23 14:13:08 petermurray sm-mta[17126]: s1NED81M017126: ruleset=check_rcpt, arg1=<anabelaalvesd@camilopinto.pt>, relay=161.pool85-60-238.dynamic.orange.es [85.60.238.161], reject=553 5.1.8 <anabelaalvesd@camilopinto.pt>... Domain of sender address anabelaalvesd@dsldevice.lan does not exist
Show the failregex fail2ban compiles (6 lines)
^\s*(?:<mail\.[^\>]+> )?<F-MLFID>(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?(?:(sm-(mta|acceptingconnections)|sendmail))(?:\(\S+\))?[\]\)]?:?|[\[\(]?(?:(sm-(mta|acceptingconnections)|sendmail))(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?(?:\w{14,20}: )?</F-MLFID><F-CONTENT>.+</F-CONTENT>$^ruleset=check_rcpt, arg1=(?P<email><\S+@\S+>), relay=(\S+ )?\[(?:(?:IPv6:)?<IP6>|<IP4>)\](?: \(may be forged\))?, reject=(?:550 5\.7\.1(?: (?P=email)\.\.\.)?(?: Relaying denied\.)? (?:IP name possibly forged \[(\d+\.){3}\d+\]|Proper authentication required\.|IP name lookup failed \[(\d+\.){3}\d+\]|Fix reverse DNS for \S+)|[45]5[13] [45]\.1\.8(?: (?P=email)\.\.\.)? Domain of sender address \S+ does not (?:exist|resolve)|550 5\.[71]\.1 (?P=email)\.\.\. (Rejected: .*|User unknown))$
^ruleset=check_relay(?:, arg\d+=\S*)*, relay=(\S+ )?\[(?:(?:IPv6:)?<IP6>|<IP4>)\](?: \(may be forged\))?, reject=421 4\.3\.2 (Connection rate limit exceeded\.|Too many open connections\.)$
^rejecting commands from (\S* )?\[(?:(?:IPv6:)?<IP6>|<IP4>)\] due to pre-greeting traffic after \d+ seconds$
^(?:\S+ )?\[(?:(?:IPv6:)?<IP6>|<IP4>)\]: (?:(?i)expn|vrfy) \S+ \[rejected\]$
^<[^@]+@[^>]+>\.\.\. (?:No such user here|User unknown)$
^<F-NOFAIL>from=<[^@]+@[^>]+></F-NOFAIL>, size=\d+, class=\d+, nrcpts=\d+,(?: bodytype=\w+,)? proto=E?SMTP, daemon=\S+, relay=(?:\S+ )?\[(?:(?:IPv6:)?<IP6>|<IP4>)\]$Test sendmail-reject in the browser or on the server: sudo fail2ban-regex /var/log/mail.log sendmail-reject · source
sogo-auth SOGo groupware
The sogo-auth filter bans failed logins to SOGo. File: /etc/fail2ban/filter.d/sogo-auth.conf; jail [sogo-auth]; log on Debian/Ubuntu: /var/log/sogo/sogo.log.
[sogo-auth]
enabled = true
port = http,https
logpath = /var/log/sogo/sogo.logLog lines it bans (from fail2ban's test suite):
Mar 24 08:58:32 sogod [26818]: SOGoRootPage Login from '173.194.44.31' for user 'hack0r' might not have worked - password policy: 65535 grace: -1 expire: -1 bound: 0Mar 24 08:58:40 sogod [26818]: SOGoRootPage Login from '173.194.44.31' for user 'kiddy' might not have worked - password policy: 65535 grace: -1 expire: -1 bound: 0Mar 24 08:58:50 sogod [26818]: SOGoRootPage Login from '173.194.44.31' for user 'plsBanMe' might not have worked - password policy: 65535 grace: -1 expire: -1 bound: 0Mar 24 08:58:59 sogod [26818]: SOGoRootPage Login from '173.194.44.31' for user 'root' might not have worked - password policy: 65535 grace: -1 expire: -1 bound: 0Mar 24 08:59:04 sogod [26818]: SOGoRootPage Login from '173.194.44.31' for user 'admin' might not have worked - password policy: 65535 grace: -1 expire: -1 bound: 0
Show the failregex fail2ban compiles (1 line)
^ sogod \[\d+\]: SOGoRootPage Login from '<HOST>(?:,[^']*)?' for user '[^']*' might not have worked( - password policy: \d* grace: -?\d* expire: -?\d* bound: -?\d*)?\s*$"^<ADDR>"Test sogo-auth in the browser or on the server: sudo fail2ban-regex /var/log/sogo/sogo.log sogo-auth · source
solid-pop3d solid-pop3d
The solid-pop3d filter bans failed POP3 logins on solid-pop3d. File: /etc/fail2ban/filter.d/solid-pop3d.conf; jail [solid-pop3d]; log on Debian/Ubuntu: /var/log/messages.
[solid-pop3d]
enabled = true
port = pop3,pop3s
logpath = %(solidpop3d_log)sLog lines it bans (from fail2ban's test suite):
Nov 15 00:34:53 rmc1pt2-2-35-70 solid-pop3d[3822]: authentication failed: no such user: adrian - 123.33.44.45Nov 15 00:34:53 rmc1pt2-2-35-70 solid-pop3d[3822]: authentication failed: can't map user name: adrian - 123.33.44.45Nov 15 00:34:53 rmc1pt2-2-35-70 solid-pop3d[3822]: authentication failed for user adrain - 123.33.44.45Nov 15 00:34:53 rmc1pt2-2-35-70 solid-pop3d[3822]: authentication failed for mapped user adrain - 123.33.44.45Nov 15 00:34:53 rmc1pt2-2-35-70 solid-pop3d[3822]: root login not allowed - 123.33.44.45
Show the failregex fail2ban compiles (4 lines)
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?solid-pop3d(?:\(\S+\))?[\]\)]?:?|[\[\(]?solid-pop3d(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?authentication failed: (no such user|can't map user name): .*? - <HOST>$
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?solid-pop3d(?:\(\S+\))?[\]\)]?:?|[\[\(]?solid-pop3d(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?(APOP )?authentication failed for (mapped )?user .*? - <HOST>$
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?solid-pop3d(?:\(\S+\))?[\]\)]?:?|[\[\(]?solid-pop3d(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?root login not allowed - <HOST>$
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?solid-pop3d(?:\(\S+\))?[\]\)]?:?|[\[\(]?solid-pop3d(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?can't find APOP secret for user .*? - <HOST>$Test solid-pop3d in the browser or on the server: sudo fail2ban-regex /var/log/messages solid-pop3d · source
squirrelmail SquirrelMail
The squirrelmail filter bans failed logins to SquirrelMail webmail. File: /etc/fail2ban/filter.d/squirrelmail.conf; jail [squirrelmail]; log on Debian/Ubuntu: /var/lib/squirrelmail/prefs/squirrelmail_access_log.
[squirrelmail]
enabled = true
port = smtp,465,submission,imap,imap2,imaps,pop3,pop3s,http,https,socks
logpath = /var/lib/squirrelmail/prefs/squirrelmail_access_logLog lines it bans (from fail2ban's test suite):
10/06/2013 15:50:41 [LOGIN_ERROR] dadas (mydomain.org) from 151.64.44.11: Unknown user or password incorrect.
Show the failregex fail2ban compiles (1 line)
^ \[LOGIN_ERROR\].*from <HOST>: Unknown user or password incorrect\.$Test squirrelmail in the browser or on the server: sudo fail2ban-regex /var/lib/squirrelmail/prefs/squirrelmail_access_log squirrelmail · source
uwimap-auth UW IMAP
The uwimap-auth filter bans failed logins on UW IMAP. File: /etc/fail2ban/filter.d/uwimap-auth.conf; jail [uwimap-auth]; log on Debian/Ubuntu: /var/log/mail.log.
[uwimap-auth]
enabled = true
port = imap,imaps
logpath = %(syslog_mail)s
backend = %(syslog_backend)sLog lines it bans (from fail2ban's test suite):
Jul 3 20:56:53 Linux2 imapd[666]: Login failed user=lizdy auth=lizdy host=h2066373.stratoserver.net [81.169.154.112]Jul 29 18:30:19 Linux2 ipop3d[25745]: Login failed user=info auth=info host=74-115-52-198-dedicated.multacom.com [198.52.115.74]Jan 14 20:28:07 grog imapd[19343]: Login excessive login failures user=user auth=user host=74-115-52-198-dedicated.multacom.com [198.52.115.74]Apr 8 16:32:01 abdon imapd[29087]: Login excessive login failures user=brada auth=brada host=xxxxxx [198.52.115.74]Apr 8 16:32:01 abdon imapd[21172]: Login disabled user=test auth=test host=localhost.localdomain [127.0.0.1]
Show the failregex fail2ban compiles (2 lines)
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?(?:ipop3d|imapd)(?:\(\S+\))?[\]\)]?:?|[\[\(]?(?:ipop3d|imapd)(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?Login (?:failed|excessive login failures|disabled|SYSTEM BREAK-IN ATTEMPT) user=\S* auth=\S* host=.*\[<HOST>\]\s*$
^(?:\[\])?\s*(?:<[^.]+\.[^.]+>\s+)?(?:\S+\s+)?(?:kernel:\s?\[ *\d+\.\d+\]:?\s+)?(?:@vserver_\S+\s+)?(?:(?:(?:\[\d+\])?:\s+[\[\(]?(?:ipop3d|imapd)(?:\(\S+\))?[\]\)]?:?|[\[\(]?(?:ipop3d|imapd)(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)\s+)?(?:\[ID \d+ \S+\]\s+)?Failed .* override of user=.* host=.*\[<HOST>\]\s*$Test uwimap-auth in the browser or on the server: sudo fail2ban-regex /var/log/mail.log uwimap-auth · source
Spotted something wrong or out of date? Tell us — every page is checked against the current fail2ban release.