[Dovecot] Last login datetime on accounts

Robert Blayzor rblayzor.bulk at inoc.net
Mon Jul 16 02:31:29 EEST 2012


I have searching for the best way to tell if a Dovecot user is idle by finding the last time they have logged in.

Right now the best way I can tell is to do something like "touch" a file in the users homedir via a post login exec.

This seems like a LOT of overhead, to accomplish such a simple task, especially if your doing a lot of dozens of logins per second.  Is there an easier/better way?  Is there a way to possibly tell Dovecot to refresh the mod time on an index file whenever the user successfully auths or to refresh a separate file in the homedir, ie: ~/.lastlogin  (not ~/Maildir/.lastlogin as that would obviously cause some issues)

Seems like something that would be far less overhead than calling a shell, execing another command, etc.

I'm open to other ideas/alternatives if they are out there!

TIA

-- 
Robert Blayzor
INOC, LLC
rblayzor at inoc.net
http://www.inoc.net/~rblayzor/






More information about the dovecot mailing list