[Dovecot] last login timestamp

Sven Hartge sven at svenhartge.de
Mon Apr 29 18:46:38 EEST 2013


Oscar A. Jara <oajara at frsf.utn.edu.ar> wrote:

> Hello, I am settiing up a dovecot (imap, pop, sieve, lda) + openldap
> infrastructure. I need to store the timestamp of the last login of
> each user in an attribute of its corresponding ldap object. I could
> not find a way of doing this through configuration options so I am
> thinking of coding this task into the dovecot-auth source code, maybe
> in the passdb-ldap.c file. What do you recomend about this? Thanks. 

I don't think this is a wise idea. LDAP does not like to be written to.

With approach like you envision you will certainly kill your LDAP server
instantly. If you have any replicated slaves, the write load you will be
creating will kill them a second later.

Either use post-login scripting to store that value in a SQL database,
or better, just touch a file in the users $HOME.

Question: why do you need this las-login timestamp information? Maybe
there is a better way to solve your problem/need.

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.



More information about the dovecot mailing list