[Dovecot] Last login

Egbert Jan van den Bussche egbert at vandenbussche.nl
Mon Jan 10 17:57:19 EET 2011


Op 9-1-2011 23:55, Jan-Frode Myklebust schreef:
> 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
TNX!

This works fine! I had to change the path but that is Ubuntu versus your 
distro. One question though:
I have file called "dump-capability" in the ...activeaccounts/imap dir. 
Any idea what that is? Maybe generated during restart of dovecot? Must 
be created bij the imap-wrapper.sh.

Egbert Jan




More information about the dovecot mailing list