map {pattern = shared/last-login/$user/$domaintable = last_loginvalue_field = last_loginvalue_type = uint
fields {username = $userdomain = $domainrip = $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@xxx.com.br';
+------------------+------------+------------+---------------+-------+
| username | domain | last_login | rip |
proto |
+------------------+------------+------------+---------------+-------+
| julio@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@psi.com.br> /(_)\ F: +55 11 99175-9260 ^ ^ PSI INTERNET ----------------------------------