[Dovecot] mailbox not acceced
Hugo Monteiro
hugo.monteiro at fct.unl.pt
Mon Feb 11 14:42:38 EET 2008
Osvaldo Alvarez Pozo wrote:
> Hi
> I wonder how can I know if a mailbox is not beeing consulted. I mean I
> have severals mailboxs but I know some account are not used. I like to
> know how to determine wich mail accounts are not beeing used. Is there
> any way in dovecot to know the las time a user loged in to dovecot?
>
> Thanks
>
>
I'm using dovecot's ability to use "pre execution" scripts.
Basically i have in my imap protocol definition in dovecot.conf an
alternate mail_executable
protocol imap {
...
mail_executable = /usr/local/bin/imap-wrapper.sh
...
}
And that executable has the following:
---- snip ----
#!/bin/sh
# Filesystem based timestamp in user's home directory and protocol used
echo imap > /var/spool/lastlogin/$UID
# Finally execute the imap/pop3 binary. If you use both, you'll need two
scripts.
exec /usr/lib/dovecot/imap
---- snip ----
I echo the protocol into the file because i have both pop and imap
available to my users and this way i can keep track when was the last
time they accessed their mailbox (ls -l /var/spool/lastlogin/username)
and which protocol they used in that access (cat
/var/spool/lastlogin/username).
There are inumerous possibilities of course.
Regards,
Hugo Monteiro.
--
ci.fct.unl.pt:~# cat .signature
Hugo Monteiro
Email : hugo.monteiro at fct.unl.pt
Telefone : +351 212948300 Ext.15307
Centro de Informática
Faculdade de Ciências e Tecnologia da
Universidade Nova de Lisboa
Quinta da Torre 2829-516 Caparica Portugal
Telefone: +351 212948596 Fax: +351 212948548
www.ci.fct.unl.pt apoio at fct.unl.pt
ci.fct.unl.pt:~# _
More information about the dovecot
mailing list