Oscar A. Jara <oajara@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.