[Dovecot] Dovceot user pop3 last connect info?
Benjamin R. Haskell
dovecot at benizi.com
Thu Oct 4 19:22:47 EEST 2007
On Thu, 4 Oct 2007, Tim Tyler wrote:
> Dovecot experts,
> I am a newbie to Dovecot. I am in the process of replacing qpopper with
> dovecot to support pop 3 clients. I have installed the latest version of
> Dovecot on Fedora Core 6. Everything seems to be working fine using ldap,
> etc.
> However, with qpopper, I used to have .pop.username files which would give
> me a time stamp of the last time a user established a pop3 connection. I
> know that Dovecot has logs of connection in the /var/log/maillog files, but
> these files rotate out over a relatively short period of time. Is there a
> method by which one can keep track of the last time a pop3 connection was
> established for each user when using Dovecot?
You can do this (and many other things) through Post-Login Scripting:
http://wiki.dovecot.org/PostLoginScripting
See in particular “Last-login tracking”:
http://wiki.dovecot.org/PostLoginScripting#line-20
A simple example for your specific request:
In /etc/dovecot/dovecot.conf:
protocol pop3 {
# [etc.]
mail_executable = /full/path/to/custom-pop3.sh
Then, in custom-pop3.sh: (which needs to be chmod +x)
#!/bin/sh
touch /var/mail/.pop.$USER
exec /usr/libexec/dovecot/pop3
Best,
Ben
More information about the dovecot
mailing list