[exim] Last access time

Top Page
Delete this message
Reply to this message
Author: mailing@securitylabs.it
Date:  
To: exim-users
Subject: [exim] Last access time
Hello, I'd like to update a field in a MySQL DB with the last access
time (something like "2010-01-08 12:58:51") every time a user authenticate.

I've the following configuration for the authenticators:


***
begin authenticators

plain_login:
         driver = plaintext
         public_name = PLAIN
         server_condition = ${lookup mysql{SELECT '1' FROM users \
                                 WHERE username = '${quote_mysql:$2}' \
                                 AND type = 'local' AND pwd = 
'${quote_mysql:$3}'} {yes}{no}}
         server_set_id = $2


fixed_login:
         driver = plaintext
         public_name = LOGIN
         server_prompts = "Username:: : Password::"
         server_condition = ${lookup mysql{SELECT '1' FROM users \
                                 WHERE username = '${quote_mysql:$1}' \
                                 AND type = 'local' AND pwd = 
'${quote_mysql:$2}'} {yes}{no}}
         server_set_id = $1


fixed_cram:
         driver = cram_md5
         public_name = CRAM-MD5
         server_secret = ${lookup mysql{SELECT pwd FROM users \
                                 WHERE username = '${quote_mysql:$1}' 
AND type = 'local'} {$value}fail}
         server_set_id = $1
***
I've already a field for every user that is updated every time a user 
login via pop3 or imap with dovecot. But I've some users that configure 
their mailbox only for sending authenticated messages (no pop3 or imap 
access) and I'd like to know that this mailbox is in use.


How can I accomplish this?

Thanks for your support.