Subversion Repositories configs

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
192 - 1
# Fail2Ban filter Dovecot authentication and pop3/imap server
2
#
3
 
4
[INCLUDES]
5
 
6
before = common.conf
7
 
8
[Definition]
9
 
10
_auth_worker = (?:dovecot: )?auth(?:-worker)?
11
_daemon = (?:dovecot(?:-auth)?|auth)
12
 
13
prefregex = ^%(__prefix_line)s(?:%(_auth_worker)s(?:\([^\)]+\))?: )?(?:%(__pam_auth)s(?:\(dovecot:auth\))?: |(?:pop3|imap)-login: )?(?:Info: )?<F-CONTENT>.+</F-CONTENT>$
14
 
15
failregex = ^authentication failure; logname=<F-ALT_USER1>\S*</F-ALT_USER1> uid=\S* euid=\S* tty=dovecot ruser=<F-USER>\S*</F-USER> rhost=<HOST>(?:\s+user=<F-ALT_USER>\S*</F-ALT_USER>)?\s*$
16
            ^(?:Aborted login|Disconnected)(?::(?: [^ \(]+)+)? \((?:auth failed, \d+ attempts(?: in \d+ secs)?|tried to use (?:disabled|disallowed) \S+ auth|proxy dest auth failed)\):(?: user=<<F-USER>[^>]*</F-USER>>,)?(?: method=\S+,)? rip=<HOST>(?:[^>]*(?:, session=<\S+>)?)\s*$
17
            ^pam\(\S+,<HOST>(?:,\S*)?\): pam_authenticate\(\) failed: (?:User not known to the underlying authentication module: \d+ Time\(s\)|Authentication failure \(password mismatch\?\)|Permission denied)\s*$
18
            ^[a-z\-]{3,15}\(\S*,<HOST>(?:,\S*)?\): (?:unknown user|invalid credentials|Password mismatch)\s*$
19
            <mdre-<mode>>
20
 
21
mdre-aggressive = ^(?:Aborted login|Disconnected)(?::(?: [^ \(]+)+)? \((?:no auth attempts|disconnected before auth was ready,|client didn't finish \S+ auth,)(?: (?:in|waited) \d+ secs)?\):(?: user=<[^>]*>,)?(?: method=\S+,)? rip=<HOST>(?:[^>]*(?:, session=<\S+>)?)\s*$
22
 
23
mdre-normal =
24
 
25
# Parameter `mode` - `normal` or `aggressive`.
26
# Aggressive mode can be used to match log-entries like:
27
#   'no auth attempts', 'disconnected before auth was ready', 'client didn't finish SASL auth'.
28
# Note it may produce lots of false positives on misconfigured MTAs.
29
# Ex.:
30
# filter = dovecot[mode=aggressive]
31
mode = normal
32
 
33
ignoreregex =
34
 
35
journalmatch = _SYSTEMD_UNIT=dovecot.service
36
 
37
datepattern = {^LN-BEG}TAI64N
38
              {^LN-BEG}
39
 
40
# DEV Notes:
41
# * the first regex is essentially a copy of pam-generic.conf
42
# * Probably doesn't do dovecot sql/ldap backends properly (resolved in edit 21/03/2016)
43
#
44
# Author: Martin Waschbuesch
45
#         Daniel Black (rewrote with begin and end anchors)
46
#         Martin O'Neal (added LDAP authentication failure regex)
47
#         Sergey G. Brester aka sebres (reviewed, optimized, IPv6-compatibility)