<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
<br>
</div>
<blockquote type="cite">
<div>
On 6 June 2019 22:40 JĂșlio Covolato via dovecot <
<a href="mailto:dovecot@dovecot.org">dovecot@dovecot.org</a>> wrote:
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<div>
Hi,
</div>
<div>
<br>
</div>
<div>
I'm configuring Last_Login plugin whith Mysql back end and all works fine.
</div>
<div>
<br>
</div>
<div>
I just wonder to track besides time_stamp, user and domain, the remote
</div>
<div>
IP and proto (imap or pop3)
</div>
<div>
<br>
</div>
<div>
I tried in dovecot.conf:
</div>
<div>
<br>
</div>
<div>
plugin {
</div>
<div>
<br>
</div>
<div>
...
</div>
<div>
<br>
</div>
<div>
...
</div>
<div>
<br>
</div>
<div>
# Track last login time on imap and pop3
</div>
<div>
last_login_dict = proxy::lastlogin
</div>
<div>
last_login_key = last-login/%u/%d/%r
</div>
<div>
<br>
</div>
<div>
}
</div>
<div>
<br>
</div>
<div>
dict {
</div>
<div>
...
</div>
<div>
<br>
</div>
<div>
lastlogin = mysql:/etc/dovecot/dovecot-last-login.conf
</div>
<div>
...
</div>
<div>
}
</div>
<div>
<br>
</div>
<div>
protocol imap {
</div>
<div>
<br>
</div>
<div>
mail_plugins = $mail_plugins ... last_login
</div>
<div>
...
</div>
<div>
<br>
</div>
<div>
}
</div>
<div>
<br>
</div>
<div>
protocol pop3 {
</div>
<div>
mail_plugins = $mail_plugins last_login
</div>
<div>
<br>
</div>
<div>
...
</div>
<div>
<br>
</div>
<div>
}
</div>
<div>
<br>
</div>
<div>
And dovecot-last-login.conf:
</div>
<div>
<br>
</div>
<div>
connect = host=127.0.0.1 port=3306 dbname=vmail user=vmailadmin
</div>
<div>
password=xxxxxxxxxxxxxxxxxx
</div>
<div>
<br>
</div>
<div>
map {
</div>
<div>
pattern = shared/last-login/$user/$domain
</div>
<div>
table = last_login
</div>
<div>
value_field = last_login
</div>
<div>
value_type = uint
</div>
<div>
<br>
</div>
<div>
fields {
</div>
<div>
username = $user
</div>
<div>
domain = $domain
</div>
<div>
rip = $rip
</div>
<div>
}
</div>
<div>
}
</div>
<div></div>
</blockquote>
<div>
<br>
</div>
<div>
You are missing /$rip in pattern.
</div>
<div class="io-ox-signature">
<pre>---
Aki Tuomi</pre>
</div>
</body>
</html>