[Dovecot] last access file for 1.0-stable?

Jeff A. Earickson jaearick at colby.edu
Tue Jul 26 14:15:52 EEST 2005


Hi,
   I am almost ready to convert from UW-imap to dovecot 1.0 stable
for my imap use.  I hacked UW-imap to touch a file in the user's
home directory so I can always tell the last time they used imap.
My hack looks something like this:

if(authenticated)
{
        touchfile = (char *) malloc((strlen (home) + 15);
        sprintf(touchfile,"%s/.imapd.last",homedir);
        fd = open(touchfile,O_WRONLY|O_CREAT|O_TRUNC,0600);
        if(fd < 0)
           syslog (LOG_NOTICE|LOG_AUTH,"touchfile failed for %s:%s",user,strerror(errno));
        else
           close(fd);
        free(touchfile);
}

Where to do this in the dovecot code?  Is there something like this 
already available?

I realize that the index/cache files contain last-access data, but
if the cache files become corrupted and have to be removed, then this
last-access information is lost.  I would like something independent
of the cache files.  Advice please...

Jeff Earickson
Colby College



More information about the dovecot mailing list