On Tue, Dec 23, 2008 at 1:54 PM, Seth Mattinen sethm@rollernet.us wrote:
Brandon Lamb wrote:
On Tue, Dec 23, 2008 at 1:30 PM, Seth Mattinen sethm@rollernet.us wrote:
Corey Shaw wrote:
Is it currently possible to log all IMAP connection attempts to a MySQL table? Thanks.
Sure. You could use syslog-ng to log directly to a database or syslog plus SEC (http://kodu.neti.ee/~risto/sec/) to trigger insert rules.
~Seth
If someone ever decides to make a log-login-tomysql plugin i would love to use it. I currently have a php script that runs during logrotate that parses the info.log for all pop3/imap logins and logs them to mysql, i only keep per minute and then i have a history table of peruser-perday for 90 days.
It would be way cool to have dovecot throw that to mysql automagically. If i were a c programmer i would do it myself =S
Somewhere on my hit list is customers wanting to see last access time for mailboxes and some informational IMAP/POP3 logging. If I ever get around to it, I could try making it a plugin rather than another rule in the fifo watcher.
Although I've never done any Dovecot development before, so if someone else does it first I wouldn't be hurt. ;)
~Seth
Its definately valuable information, I like being able to look up a user to see their past logins and by type (pop3, imap) and be able to use this information to shut off or reduce quotas on seemingly dormant accounts, and helps to identify spam boxes. If i didnt have to run a php script it would be all the better, plus if i want information RIGHT NOW I have to remember to run the script before querying the current logins.