|
Server : LiteSpeed System : Linux srv104790275 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64 User : dewac4139 ( 1077) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/share/doc/dovecot-core/wiki/ |
Upload File : |
Last Login Plugin
=================
Requires v2.2.14+. This plugin can be used to easily update user's last-login
timestamp in the configured <dictionary> [Dictionary.txt]. Configuration:
---%<-------------------------------------------------------------------------
protocol imap {
mail_plugins = $mail_plugins last_login
}
protocol pop3 {
mail_plugins = $mail_plugins last_login
}
plugin {
last_login_dict = redis:host=127.0.0.1:port=6379
#last_login_key = last-login/%u # default
}
---%<-------------------------------------------------------------------------
Note that we enable last_login plugin explicitly only for imap & pop3
protocols. If enabled globally, it'll also update the timestamp whenever new
mails are delivered via lda/lmtp or when doveadm is run for the user. This can
also be thought of as a feature, so if you want to update a different timestamp
for user when new mails are delivered, you can do that by enabling the
last_login plugin also for lda/lmtp and changing the last_login_key setting.
Example dict config with schema
---%<-------------------------------------------------------------------------
CREATE TABLE `users` (
`userid` varchar(255) NOT NULL,
...
`last_login` int(11) DEFAULT NULL,
PRIMARY KEY (`userid`)
)
---%<-------------------------------------------------------------------------
---%<-------------------------------------------------------------------------
map {
pattern = shared/last-login/$user
table = users
value_field = last_login
value_type = uint
fields {
userid = $user
}
}
---%<-------------------------------------------------------------------------
(This file was created from the wiki on 2019-06-19 12:42)