1

Topic: Track failed username and password for postfix smtp and dovecot

==== Required information ====
- iRedMail 0.9.6
- Linux/ Debian
- Store mail accounts in MySQL
- Web server Apache
- Manage mail accounts with iRedAdmin-Pro? no
====

I would like to see the failed attempts username and password combination on my iredmail server.
Ideally it would be in a log or automated email that is less cluttered than a debug=5 log file as I would like to make this a permanent solution.

My fail2ban is working fine. I do get notified. I have it strict enough that a casual user is not going to get in. But I am getting enough hits that something seems bigger. A botnet? A nation state out for fun? I don't know and that is the problem. I can't realistically ban the entire planet.

So the reason for requesting this is to see if the failed attempts are getting close to a real password and who they are attacking. This way I would only need to alert the 1 or 2 users being picked on rather than everyone getting the message to change their email password just in case.

It would also be a nice idea if every user that gets a failed login attempt is sent an email informing them of the failure and the password used. Then the user can be self actualized.

What do you think? Good Idea? Bad Idea? Too hard? RTFM?
Any guidance on how to do this would be appreciated. My initial web search has yielded little help.

Thanks
Steve

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Track failed username and password for postfix smtp and dovecot

Dovecot has debug option to log plain password:
http://www.iredmail.org/docs/debug.dovecot.html

3

Re: Track failed username and password for postfix smtp and dovecot

Thanks for the suggestion.

I followed the doc to add debugging to dovecot.

Although it did start adding a large amount of debug code to my log file, it did not provide the passwords. As a test I used my own account in thunderbird to send a message to an external account. My password was not in the debug code.

As a long term feature/solution we need a better method than debug code in log files. Obviously I don't know how to do it, but I am willing to help. It seems to me that if we could hook in to the calls to the database that verify the username/password combo we could then do lots of things. For instance we could make our own table of failed login attempts.

4

Re: Track failed username and password for postfix smtp and dovecot

no idea. i suggest posting your question to dovecot mailing list.