[Dovecot] Last login datetime on accounts

Ed W lists at wildgooses.com
Mon Jul 16 20:49:27 EEST 2012


On 16/07/2012 12:01, Robert Schetterer wrote:
> Am 16.07.2012 12:48, schrieb Charles Marcus:
>> On 2012-07-16 2:45 AM, Robert Schetterer <robert at schetterer.org> wrote:
>>> i have running touch with 3000 users, i dont see much overhead, anyway
>>> its true ,its not very elegant, perhaps i.e you may write some daily
>>> cron bash find script looking about latest timestamp of files in .new
>>> with maildir
>>> which of cource is not the same as last_login script, but may good
>>> enough for you
>> Why not a simple post-login script that updates your userDB?
>>
>> http://wiki2.dovecot.org/PostLoginScripting
>>
> i may fail, but in the orig question
> PostLoginScripting is allready used but with touch a last_login file
> so update some db with same mech may not much better
> i thought some other way then PostLoginScripting was searched for
>

I have a similar desire, I would also like to log "logout" time.  I 
think for lowest load you would want postloginscript to talk to some 
long running daemon process, which in turn caches logins and does 
sensible batching of updates.

Timo commented that a plugin would be a good way to do all of the above:

http://dovecot.org/patches/2.2/imap-logout-plugin.c

I haven't had capacity to build anything yet...

Cheers

E dW



More information about the dovecot mailing list