[Dovecot] Possible to log IMAP connections to MySQL Table?
Seth Mattinen
sethm at rollernet.us
Tue Dec 23 23:54:03 EET 2008
Brandon Lamb wrote:
> On Tue, Dec 23, 2008 at 1:30 PM, Seth Mattinen <sethm at 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
More information about the dovecot
mailing list