Can anyone help me with a special f2b Filter to track down recurring login fails on a specific mailbox? i don't want to limit fails to global postfix jail. Therefore i need a extra filter.
I also think I need some more regex, as in my line with Mailbox there's no IP, right?
Here content:
Sep 14 22:00:28 host01 plesk_saslauthd[7633]: failed mail authentication attempt for user 'office@customer-domain.de' (password len=9)
Sep 14 22:00:28 host01 postfix/smtpd[6772]: warning: SASL authentication failure: Password verification failed
Sep 14 22:00:28 host01 postfix/smtpd[6772]: warning: unknown[190.124.18.242]: SASL PLAIN authentication failed: authentication failure
Jail shall trigger if office@customer-domain.de got fail, but it needs probably the IP from Line 3?!
I need this because attacker only runs ONCE false Password and than moves to another IP. I want to track this down only for one Mailbox to have him banned after 1 Fail. To Change the globally postfix trigger to one fail only is to strong and bad for real users.
Here is the Postfix Jail:
[INCLUDES]
before = common.conf
[Definition]
_daemon = postfix(-\w+)?/(?:submission/|smtps/)?smtp[ds]
failregex = ^%(__prefix_line)swarning: [-._\w]+\[<HOST>\]: SASL ((?i)LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed(:[ A-Za-z0-9+/:]*={0,2})?\s*$
ignoreregex = authentication failed: Connection lost to authentication server$
[Init]
journalmatch = _SYSTEMD_UNIT=postfix.service