On Sun, Jan 09, 2011 at 09:19:39PM +0100, Egbert Jan van den Bussche
wrote:>
> I'm trying to find a way to find inactive users.
What we do is to touch a file upon every login:
protocol imap {
<snip>
mail_executable = /usr/local/dovecot/sbin/imap-wrapper.sh
}
protocol pop3 {
<snip>
mail_executable = /usr/local/dovecot/sbin/pop-wrapper.sh
}
and these simply do:
#! /bin/sh -
touch /var/log/activemailaccounts/imap/$USER
exec /usr/local/dovecot/libexec/dovecot/imap
Once a day we push this info to a database, and use that to view
stats on account/protocol usage.
-jf