Last Login Plugin Help

Júlio Covolato julio at psi.com.br
Fri Jun 7 18:39:59 EEST 2019


Em 06/06/2019 22:45, Aki Tuomi via dovecot escreveu:
>> map {
>>     pattern = shared/last-login/$user/$domain
>>     table = last_login
>>     value_field = last_login
>>     value_type = uint
>>
>>     fields {
>>         username = $user
>>         domain = $domain
>>        rip = $rip
>>     }
>> }
>
> You are missing /$rip in pattern.
> ---
> Aki Tuomi


Thanks Aki.

Works perfectly.

What I did:

#$ cat dovecot-last-login.conf

connect = host=127.0.0.1 port=3306 dbname=vmail user=vmailadmin 
password=xxxxxxxxxxxxxxx

map {
     pattern = shared/last-login/$user/$domain/$rip/$service
     table = last_login
     value_field = last_login
     value_type = uint

     fields {
         username = $user
         domain = $domain
         rip = $rip
         proto = $service
     }
}

------------------------------------------------------

dovecot.conf:

plugin {

...

...

     # Track last login time on imap and pop3
     last_login_dict = proxy::lastlogin
     last_login_key = last-login/%u/%d/%r/%s
}

Result on mysql:

mysql> select * from last_login where username = 'julio at xxx.com.br';
+------------------+------------+------------+---------------+-------+
| username         | domain     | last_login | rip           | proto |
+------------------+------------+------------+---------------+-------+
| julio at xxx.com.br | xxx.com.br | 1559921589 | 177.xxx.xxx.230 | imap  |
+------------------+------------+------------+---------------+-------+
1 row in set (0.00 sec)


Thank you very much!!

----------------------------------
     _    Engº Julio Cesar Covolato
    0v0   <julio at psi.com.br>
   /(_)\  F: +55 11 99175-9260
    ^ ^   PSI INTERNET
----------------------------------



---
Este email foi escaneado pelo Avast antivírus.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20190607/bf97eb1b/attachment.html>


More information about the dovecot mailing list