Jacek Osiecki
2012-Feb-16 08:41 UTC
[Dovecot] Any possibility of running query after sucessful login?
Hi, I'm using finally dovecot 2.0 after quite a smooth upgrade from 1.0 :) with virtual mailboxes stored in sql database. Sometimes I need to check if a mailbox has been used recently or not. Checking for logins in dovecot logs sometimes means searching through gigabytes of info... I was just wondering if there is any possibility of running another query after successful login - just to fill some extra field like "last_login"? So far my only idea is to replace user/password query with procedure like login(user,password) that would also return a line as required by user/password query. However, some mysql implementations (for example, standard php-mysql) can't handle procedures which return values - so will it work in dovecot? Or maybe some other ideas how to do that? Greetings, -- Jacek Osiecki joshua at ceti.pl GG:3828944 I don't want something I need. I want something I want.
Jan-Frode Myklebust
2012-Feb-16 09:20 UTC
[Dovecot] Any possibility of running query after sucessful login?
On Thu, Feb 16, 2012 at 09:41:52AM +0100, Jacek Osiecki wrote:> > I was just wondering if there is any possibility of running another > query after successful login - just to fill some extra field like > "last_login"?We touch a file in /var/log/activemailaccounts/$username on every successful login trough postlogin scripting: http://wiki2.dovecot.org/PostLoginScripting -jf