On 6 June 2019 22:40 Júlio Covolato via dovecot < [email protected]> wrote:
Hi,
I'm configuring Last_Login plugin whith Mysql back end and all works fine.
I just wonder to track besides time_stamp, user and domain, the remoteIP and proto (imap or pop3)
I tried in dovecot.conf:
plugin {
...
...
# Track last login time on imap and pop3last_login_dict = proxy::lastloginlast_login_key = last-login/%u/%d/%r
}
dict {...
lastlogin = mysql:/etc/dovecot/dovecot-last-login.conf...}
protocol imap {
mail_plugins = $mail_plugins ... last_login...
}
protocol pop3 {mail_plugins = $mail_plugins last_login
...
}
And dovecot-last-login.conf:
connect = host=127.0.0.1 port=3306 dbname=vmail user=vmailadminpassword=xxxxxxxxxxxxxxxxxx
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
