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 remote IP and proto (imap or pop3)
I tried in dovecot.conf:
plugin {
...
...
# Track last login time on imap and pop3 last_login_dict = proxy::lastlogin last_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=vmailadmin password=xxxxxxxxxxxxxxxxxx
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
And the table criated in mysql:
CREATE TABLE IF NOT EXISTS last_login
(
username
VARCHAR(255) NOT NULL DEFAULT '',
domain
VARCHAR(255) NOT NULL DEFAULT '',
last_login
INT(11) DEFAULT NULL,
rip
VARCHAR(16) NOT NULL DEFAULT '',
PRIMARY KEY (username
),
INDEX (domain
),
INDEX (last_login
),
INDEX (rip
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
And got de error in dovecot log:
Jun 06 13:56:59 dict(21157): Error: Failed to initialize dictionary 'lastlogin': dict mysql: Error in configuration file /etc/dovecot/dovecot-last-login.conf line 13: Unused variable: rip
Thanks in any help.
--
_ Engº Julio Cesar Covolato
0v0 <julio@psi.com.br>
/(_)\ F: +55 11 99175-9260 ^ ^ PSI INTERNET
Este email foi escaneado pelo Avast antivírus. https://www.avast.com/antivirus