[Dovecot] Executing SQL update upon login

Timo Sirainen tss at iki.fi
Tue Oct 10 10:59:37 UTC 2006


On Tue, 2006-10-10 at 09:23 +0200, Tom Sommer wrote:
> Hi,
> 
> I'm using SQL authentication in dovecot, and was wondering if anyone had
> any ideas as to how I could run an UPDATE statement upon each login, to
> set time of last login (and other interesting stuff) in the database
> table.

Set mail_executable to point to a script:

#!/bin/sh

echo "update blah where user = '$USER'" | mysql ..

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/20061010/b9f72872/attachment.pgp 


More information about the dovecot mailing list