[Dovecot] Detecting unused accounts

Ben Beuchler insyte at emt-p.org
Mon Oct 11 23:46:50 EEST 2004


On Mon, Oct 11, 2004 at 08:19:37PM +0300, Timo Sirainen wrote:

> On 11.10.2004, at 16:39, Ben Beuchler wrote:
> 
> >I'm looking for a way to figure out which accounts have not been logged
> >in to in over n days.  It occurs to me that, perhaps, the way to do
> >this would be to look at the mtime on one of the dovecot-maintained
> >files, like 'dovecot-uidlist'.  Is there a particular file that would
> >be modified on (almost) every login, whether it be via POP or IMAP?
> 
> Probably best would be to check atime of .INBOX/.imap.index file. 
> dovecot-uidlist isn't necessarily accessed every time. And if nothing 
> has changed in mailboxes, mtime isn't changed from any file.

Unfortunately, I've mounted the filesystem with 'noatime'.  However, since
I'm only interested in people that haven't logged in in a very long time,
mtime of .INBOX/.imap.index would probably suffice.

Thanks!

-- 
Ben Beuchler                                           There is no spoon.
insyte at emt-p.org                                            -- The Matrix



More information about the dovecot mailing list