diff --git a/config/filter.d/courier-smtp.conf b/config/filter.d/courier-smtp.conf index 2b9a13f2..7df385bf 100644 --- a/config/filter.d/courier-smtp.conf +++ b/config/filter.d/courier-smtp.conf @@ -12,7 +12,8 @@ before = common.conf _daemon = courieresmtpd -failregex = ^%(__prefix_line)serror,relay=,.*: 550 User unknown\.$ +failregex = ^%(__prefix_line)serror,relay=,.*: 550 User (<.*> )?unknown\.?$ + ^%(__prefix_line)serror,relay=,msg="535 Authentication failed\.",cmd:( AUTH \S+)?( [0-9a-zA-Z\+/=]+)?$ ignoreregex = diff --git a/fail2ban/tests/files/logs/courier-smtp b/fail2ban/tests/files/logs/courier-smtp index 212df3b4..7beaf856 100644 --- a/fail2ban/tests/files/logs/courier-smtp +++ b/fail2ban/tests/files/logs/courier-smtp @@ -1,5 +1,9 @@ # failJSON: { "time": "2005-04-10T03:47:57", "match": true , "host": "1.2.3.4" } Apr 10 03:47:57 web courieresmtpd: error,relay=::ffff:1.2.3.4,ident=tmf,from=,to=: 550 User unknown. +# failJSON: { "time": "2005-07-03T23:07:20", "match": true , "host": "1.2.3.4" } +Jul 3 23:07:20 szerver courieresmtpd: error,relay=::ffff:1.2.3.4,msg="535 Authentication failed.",cmd: YWRvYmVhZG9iZQ== +# failJSON: { "time": "2005-07-04T18:39:39", "match": true , "host": "1.2.3.4" } +Jul 4 18:39:39 mail courieresmtpd: error,relay=::ffff:1.2.3.4,from=,to=: 550 User unknown # failJSON: { "time": "2005-07-06T03:42:28", "match": true , "host": "1.2.3.4" } Jul 6 03:42:28 whistler courieresmtpd: error,relay=::ffff:1.2.3.4,from=<>,to=: 550 User unknown. # failJSON: { "time": "2004-11-21T23:16:17", "match": true , "host": "1.2.3.4" }