2013-10-30 13:02:59 +00:00
# Fail2Ban filter for exim
2006-12-23 09:49:19 +00:00
#
2013-10-30 13:02:59 +00:00
# This includes the rejection messages of exim. For spam and filter
# related bans use the exim-spam.conf
2006-12-23 09:49:19 +00:00
#
2013-07-02 10:03:16 +00:00
[INCLUDES]
# Read common prefixes. If any customizations available -- read them from
# exim-common.local
before = exim-common.conf
2006-12-23 09:49:19 +00:00
[Definition]
2017-02-21 14:54:59 +00:00
# Fre-filter via "prefregex" is currently inactive because of too different failure syntax in exim-log (testing needed):
#prefregex = ^%(pid)s <F-CONTENT>\b(?:\w+ authenticator failed|([\w\-]+ )?SMTP (?:(?:call|connection) from|protocol(?: synchronization)? error)|no MAIL in|(?:%(host_info_pre)s\[[^\]]+\]%(host_info_suf)s(?:sender verify fail|rejected RCPT|dropped|AUTH command))).+</F-CONTENT>$
2013-07-01 11:50:35 +00:00
failregex = ^%(pid)s %(host_info)ssender verify fail for <\S+>: (?:Unknown user|Unrouteable address|all relevant MX records point to non-existent hosts)\s*$
2017-04-24 17:13:38 +00:00
^%(pid)s \w+ authenticator failed for (?:[^\[\( ]* )?(?:\(\S*\) )?\[<HOST>\](?::\d+)?(?: I=\[\S+\](:\d+)?)?: 535 Incorrect authentication data( \(set_id=.*\)|: \d+ Time\(s\))?\s*$
2017-05-07 11:53:06 +00:00
^%(pid)s %(host_info)srejected RCPT [^@]+@\S+: (?:relay not permitted|Sender verify failed|Unknown user|Unrouteable address)\s*$
2016-05-30 15:02:12 +00:00
^%(pid)s SMTP protocol synchronization error \([^)]*\): rejected (?:connection from|"\S+") %(host_info)s(?:next )?input=".*"\s*$
2023-04-24 13:40:53 +00:00
^%(pid)s SMTP call from (?:[^\[\( ]* )?%(host_info)sdropped: too many (?:(?:nonmail|unrecognized) commands|syntax or protocol errors)
2017-11-30 11:32:24 +00:00
^%(pid)s SMTP protocol error in "[^"]+(?:"+[^"]*(?="))*?" %(host_info)sAUTH command used when not advertised\s*$
2017-09-07 13:28:46 +00:00
^%(pid)s no MAIL in SMTP connection from (?:[^\[\( ]* )?(?:\(\S*\) )?%(host_info)sD=\d\S*s(?: C=\S*)?\s*$
2017-05-07 11:02:32 +00:00
^%(pid)s (?:[\w\-]+ )?SMTP connection from (?:[^\[\( ]* )?(?:\(\S*\) )?%(host_info)sclosed by DROP in ACL\s*$
2017-12-05 15:07:53 +00:00
<mdre-<mode>>
mdre-aggressive = ^%(pid)s no host name found for IP address <HOST>$
^%(pid)s no IP address found for host \S+ \(during SMTP connection from \[<HOST>\]\)$
mdre-normal =
# Parameter `mode` - `normal` or `aggressive`.
# Aggressive mode can be used to match flood and ddos-similar log-entries like:
# 'no host found for IP', 'no IP found for host'.
# Note this is not an authentication failures, so it may produce lots of false
# positives on misconfigured MTAs.
# Ex.:
# filter = exim[mode=aggressive]
mode = normal
2006-12-23 09:49:19 +00:00
ignoreregex =
2013-10-30 13:02:59 +00:00
# DEV Notes:
# The %(host_info) defination contains a <HOST> match
#
2013-11-12 07:13:35 +00:00
# SMTP protocol synchronization error \([^)]*\) <- This needs to be non-greedy
# to void capture beyond ")" to avoid a DoS Injection vulnerabilty as input= is
# user injectable data.
#
2013-10-30 13:02:59 +00:00
# Author: Cyril Jaquier
# Daniel Black (rewrote with strong regexs)
2016-03-21 05:59:59 +00:00
# Martin O'Neal (added additional regexs to detect authentication failures, protocol errors, and drops)