[Dovecot] Preforming an action/trigger after a user successfully authenticates

Timo Sirainen tss at iki.fi
Mon Sep 25 22:59:13 EEST 2006


On Mon, 2006-09-25 at 12:55 -0700, Dan Trainor wrote:
> Hi -
> 
> I have searched the docs for v1.0 RC7, but cannot find what I'm looking for.
> 
> What I'm ultimately wanting to do is have Dovecot preform some action, 
> or a trigger, when the user is successfully authenticated.  Even more 
> specifically, I'd like to run another SQL query to record a date/time 
> for last authenticated login.
> 
> Short from running a script during logrotate, or constantly tailing the 
> log, is there any mechanism in Dovecot that would allow me to do this? 
> Again, all I'm looking to do is to record the last date/time that 
> someone successfully logged in, into a MySQL database.

Change mail_executable to point to a script containing something like:

#!/bin/sh

echo "update table ..." | mysql
exec /usr/libexec/dovecot/imap/imap

And same for pop3 if you use that.

-------------- 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/20060925/c8b6e859/attachment.pgp 


More information about the dovecot mailing list