[Dovecot] How to store Dovecot Logs in SQL DB

Timo Sirainen tss at iki.fi
Sun Oct 8 23:51:02 UTC 2006


On Mon, 2006-09-04 at 10:45 +0200, Krzysztof wrote:
> >
> > Or are you trying to say that authentication logging to SQL should be a
> > Dovecot feature?
> >
> >   
> It would be great if Dovecot had that feature.

In Dovecot v2.0 I'm going to use separate log processes, which should
then be somewhat easily replaceable with eg. perl scripts that log to
database. Or whatever.

> I need it for quick view of users login history. 

You could do this by pointing mail_executable to a script:

#!/bin/sh

echo "INSERT INTO logins (user, time) VALUES ('$user', now())" | psql mails

exec /usr/local/libexec/dovecot/imap

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20061009/fee73653/attachment.pgp 


More information about the dovecot mailing list