28 Feb
2007
28 Feb
'07
10:47 p.m.
On Fri, 2007-02-23 at 09:38 +0100, Luca Bertoncello wrote:
Hi, @all!
Is it possible, with Dovecot, to do something (eg: an SQL-Query) when the User logs out (POP3) or do some action (IMAP)?
My problem is to notify a DB when the user logs out or delete E-Mail (in this case, just for IMAP).
http://wiki.dovecot.org/PostLoginScripting
But instead of execing pop3 do something like:
#!/bin/sh
/usr/local/libexec/dovecot/pop3 echo "update logged_out..." | mysql
Of course that means that there are now extra shell processes waiting for users to log out.
As for deleting mails, there's currently no simple way to do it. You could pretty easily modify mail-log plugin though. Some day in future there will be some more generic "event plugin".