Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields {
username = $user
domain = $domain
rip = $rip
}
}
Aki
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ? https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四 下午03:04:10 [GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
Anyone know then last_login plugins do support standard auth variables in var-expand?like %k %a variables. I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, any patch for this? thanks
https://doc.dovecot.org/configuration_manual/config_file/config_variables/ Henry (<hl1723@yahoo.com.hk>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道:
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ? https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四 下午03:04:10 [GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
last_login supports some of the variables.
Mail service and mail user variables are supported.
You can try export the auth variables as userdb variables and use $variablename.
Aki
On 27 February 2021 7.29.10 EET, Henry <hl1723@yahoo.com.hk> wrote:
Anyone know then last_login plugins do support standard auth variables in var-expand?like %k %a variables. I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, any patch for this? thanks
https://doc.dovecot.org/configuration_manual/config_file/config_variables/ Henry (<hl1723@yahoo.com.hk>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道:
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ? https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四 下午03:04:10 [GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
On Feb 27, 2021, at 7:32 PM, Aki Tuomi <aki.tuomi@open-xchange.com> wrote:
last_login supports some of the variables.
Dear Aki,
Does last_login plugin support PostgreSQL now?
Old reports:
Zhang Huangbin, founder of iRedMail project: https://www.iredmail.org/
I already try using other variables , I found it only support "Mail service user variables", no support "Login variables" and "Authentication variables" below the error when I try to using "Login variables" and "Authentication variables" Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%k': Unknown variable '%k' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%b': Unknown variable '%b'Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%m': Unknown variable '%m'
I using centos 8 and dovecot-2.3.13-2.x86_64,
thanks Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月27日星期六 下午07:32:38 [GMT+8] 寫道:
last_login supports some of the variables.
Mail service and mail user variables are supported.
You can try export the auth variables as userdb variables and use $variablename.
Aki
On 27 February 2021 7.29.10 EET, Henry <hl1723@yahoo.com.hk> wrote:
Anyone know then last_login plugins do support standard auth variables in var-expand?like %k %a variables. I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, any patch for this? thanks
https://doc.dovecot.org/configuration_manual/config_file/config_variables/ Henry (<hl1723@yahoo.com.hk>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道:
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ? https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四 下午03:04:10 [GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
like capture local_port, I using %a will got below error Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I using any of $local_port ,'$local_port', "$local_port", $local_port
I got the database update as $local_port ,'$local_port', "$local_port", $local_port
at the field column record.
Henry (<hl1723@yahoo.com.hk>) 在 2021年2月27日星期六 下午10:57:27 [GMT+8] 寫道:
I already try using other variables , I found it only support "Mail service user variables", no support "Login variables" and "Authentication variables" below the error when I try to using "Login variables" and "Authentication variables" Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%k': Unknown variable '%k' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%b': Unknown variable '%b'Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%m': Unknown variable '%m'
I using centos 8 and dovecot-2.3.13-2.x86_64,
thanks Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月27日星期六 下午07:32:38 [GMT+8] 寫道:
last_login supports some of the variables.
Mail service and mail user variables are supported.
You can try export the auth variables as userdb variables and use $variablename.
Aki
On 27 February 2021 7.29.10 EET, Henry <hl1723@yahoo.com.hk> wrote:
Anyone know then last_login plugins do support standard auth variables in var-expand?like %k %a variables. I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, any patch for this? thanks
https://doc.dovecot.org/configuration_manual/config_file/config_variables/ Henry (<hl1723@yahoo.com.hk>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道:
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ? https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四 下午03:04:10 [GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
In your userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
Then it will expand into what you want, and will be imported into user's environment.
Aki
On 28/02/2021 05:57 Henry <hl1723@yahoo.com.hk> wrote:
like capture local_port, I using %a will got below error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I using any of $local_port ,'$local_port', "$local_port",
$local_port
I got the database update as $local_port ,'$local_port', "$local_port",
$local_port
at the field column record.Henry (<hl1723@yahoo.com.hk>) 在 2021年2月27日星期六 下午10:57:27 [GMT+8] 寫道:
I already try using other variables , I found it only support "Mail service user variables", no support "Login variables" and "Authentication variables"
below the error when I try to using "Login variables" and "Authentication variables"
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%k': Unknown variable '%k' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%b': Unknown variable '%b' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%m': Unknown variable '%m'
I using centos 8 and dovecot-2.3.13-2.x86_64,
thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月27日星期六 下午07:32:38 [GMT+8] 寫道:
last_login supports some of the variables.
Mail service and mail user variables are supported.
You can try export the auth variables as userdb variables and use $variablename.
Aki
On 27 February 2021 7.29.10 EET, Henry <hl1723@yahoo.com.hk> wrote:
Anyone know then last_login plugins do support standard auth variables in var-expand?like %k %a variables. I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, any patch for this? thanks
https://doc.dovecot.org/configuration_manual/config_file/config_variables/ Henry (<hl1723@yahoo.com.hk>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道:
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ? https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四 下午03:04:10 [GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Dear Aka, If in userdb, set last_login_key=last-login/%u/%d/%r/%l/%a then cannot restart dovecot the error below : master: Error: Error reading configuration: Error in configuration file /etc/dovecot/dovecot.conf line 45: Unknown setting: userdb { last_login_key
# If in userdb, set default_fields = last_login_key = last-login/%u/%d/%r/%l/%aError:auth: Fatal: Invalid userdb template last_login_key = last-login/%u/%d/%r/%l/%a - key must not be empty
what is my wrongs about? thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午02:56:51 [GMT+8] 寫道:
In your userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
Then it will expand into what you want, and will be imported into user's environment.
Aki
On 28/02/2021 05:57 Henry <hl1723@yahoo.com.hk> wrote:
like capture local_port, I using %a will got below error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I using any of $local_port ,'$local_port', "$local_port",
$local_port
I got the database update as $local_port ,'$local_port', "$local_port",
$local_port
at the field column record.Henry (<hl1723@yahoo.com.hk>) 在 2021年2月27日星期六 下午10:57:27 [GMT+8] 寫道:
I already try using other variables , I found it only support "Mail service user variables", no support "Login variables" and "Authentication variables"
below the error when I try to using "Login variables" and "Authentication variables"
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%k': Unknown variable '%k' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%b': Unknown variable '%b' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%m': Unknown variable '%m'
I using centos 8 and dovecot-2.3.13-2.x86_64,
thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月27日星期六 下午07:32:38 [GMT+8] 寫道:
last_login supports some of the variables.
Mail service and mail user variables are supported.
You can try export the auth variables as userdb variables and use $variablename.
Aki
On 27 February 2021 7.29.10 EET, Henry <hl1723@yahoo.com.hk> wrote:
Anyone know then last_login plugins do support standard auth variables in var-expand?like %k %a variables. I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, any patch for this? thanks
https://doc.dovecot.org/configuration_manual/config_file/config_variables/ Henry (<hl1723@yahoo.com.hk>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道:
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ? https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四 下午03:04:10 [GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
It goes into the arguments section...
Not having your config, I have to guess, but e.g.
userdb { driver = static args = last_login_key=last-login/%u/%d/%r/%l/%a }
And similarly with other drivers, depending what you use.
Aki
On 28/02/2021 09:53 Henry <hl1723@yahoo.com.hk> wrote:
Dear Aka,
If in userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
then cannot restart dovecot the error below :
master: Error: Error reading configuration: Error in configuration file /etc/dovecot/dovecot.conf line 45: Unknown setting: userdb { last_login_key
# If in userdb, set default_fields = last_login_key = last-login/%u/%d/%r/%l/%a Error: auth: Fatal: Invalid userdb template last_login_key = last-login/%u/%d/%r/%l/%a - key must not be empty
what is my wrongs about? thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午02:56:51 [GMT+8] 寫道:
In your userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
Then it will expand into what you want, and will be imported into user's environment.
Aki
On 28/02/2021 05:57 Henry <hl1723@yahoo.com.hk> wrote:
like capture local_port, I using %a will got below error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I using any of $local_port ,'$local_port', "$local_port",
$local_port
I got the database update as $local_port ,'$local_port', "$local_port",
$local_port
at the field column record.Henry (<hl1723@yahoo.com.hk>) 在 2021年2月27日星期六 下午10:57:27 [GMT+8] 寫道:
I already try using other variables , I found it only support "Mail service user variables", no support "Login variables" and "Authentication variables"
below the error when I try to using "Login variables" and "Authentication variables"
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%k': Unknown variable '%k' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%b': Unknown variable '%b' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%m': Unknown variable '%m'
I using centos 8 and dovecot-2.3.13-2.x86_64,
thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月27日星期六 下午07:32:38 [GMT+8] 寫道:
last_login supports some of the variables.
Mail service and mail user variables are supported.
You can try export the auth variables as userdb variables and use $variablename.
Aki
On 27 February 2021 7.29.10 EET, Henry <hl1723@yahoo.com.hk> wrote:
Anyone know then last_login plugins do support standard auth variables in var-expand?like %k %a variables. I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, any patch for this? thanks
https://doc.dovecot.org/configuration_manual/config_file/config_variables/ Henry (<hl1723@yahoo.com.hk>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道:
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ? https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四 下午03:04:10 [GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
current config as below: userdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}plugin { quota = maildir:User quota last_login_dict = proxy::lastlogin last_login_key = last-login/%u/%d/%r/%l/%a quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full"} ### If I changed as below no help,still no pass the Variable to last_loginuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}userdb { driver = static args = last_login_key=last-login/%u/%d/%r/%l/%a} ###If I changed as below will trouble ,cannot restart dovecotuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext last_login_key=last-login/%u/%d/%r/%l/%a driver = sql}
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午03:56:09 [GMT+8] 寫道:
It goes into the arguments section...
Not having your config, I have to guess, but e.g.
userdb { driver = static args = last_login_key=last-login/%u/%d/%r/%l/%a }
And similarly with other drivers, depending what you use.
Aki
On 28/02/2021 09:53 Henry <hl1723@yahoo.com.hk> wrote:
Dear Aka,
If in userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
then cannot restart dovecot the error below :
master: Error: Error reading configuration: Error in configuration file /etc/dovecot/dovecot.conf line 45: Unknown setting: userdb { last_login_key
# If in userdb, set default_fields = last_login_key = last-login/%u/%d/%r/%l/%a Error: auth: Fatal: Invalid userdb template last_login_key = last-login/%u/%d/%r/%l/%a - key must not be empty
what is my wrongs about? thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午02:56:51 [GMT+8] 寫道:
In your userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
Then it will expand into what you want, and will be imported into user's environment.
Aki
On 28/02/2021 05:57 Henry <hl1723@yahoo.com.hk> wrote:
like capture local_port, I using %a will got below error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I using any of $local_port ,'$local_port', "$local_port",
$local_port
I got the database update as $local_port ,'$local_port', "$local_port",
$local_port
at the field column record.Henry (<hl1723@yahoo.com.hk>) 在 2021年2月27日星期六 下午10:57:27 [GMT+8] 寫道:
I already try using other variables , I found it only support "Mail service user variables", no support "Login variables" and "Authentication variables"
below the error when I try to using "Login variables" and "Authentication variables"
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%k': Unknown variable '%k' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%b': Unknown variable '%b' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%m': Unknown variable '%m'
I using centos 8 and dovecot-2.3.13-2.x86_64,
thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月27日星期六 下午07:32:38 [GMT+8] 寫道:
last_login supports some of the variables.
Mail service and mail user variables are supported.
You can try export the auth variables as userdb variables and use $variablename.
Aki
On 27 February 2021 7.29.10 EET, Henry <hl1723@yahoo.com.hk> wrote:
Anyone know then last_login plugins do support standard auth variables in var-expand?like %k %a variables. I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, any patch for this? thanks
https://doc.dovecot.org/configuration_manual/config_file/config_variables/ Henry (<hl1723@yahoo.com.hk>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道:
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ? https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四 下午03:04:10 [GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
You need to put it in the sql query. SELECT ..., 'last-login/%u/%d/%r/%l/%a' AS last_login_key
Aki
On February 28, 2021 8:12:39 AM UTC, Henry <hl1723@yahoo.com.hk> wrote:
current config as below: userdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}plugin { quota = maildir:User quota last_login_dict = proxy::lastlogin last_login_key = last-login/%u/%d/%r/%l/%a quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full"} ### If I changed as below no help,still no pass the Variable to last_loginuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}userdb { driver = static args = last_login_key=last-login/%u/%d/%r/%l/%a} ###If I changed as below will trouble ,cannot restart dovecotuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext last_login_key=last-login/%u/%d/%r/%l/%a driver = sql}
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午03:56:09 [GMT+8] 寫道:
It goes into the arguments section...
Not having your config, I have to guess, but e.g.
userdb { driver = static args = last_login_key=last-login/%u/%d/%r/%l/%a }
And similarly with other drivers, depending what you use.
Aki
On 28/02/2021 09:53 Henry <hl1723@yahoo.com.hk> wrote:
Dear Aka,
If in userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
then cannot restart dovecot the error below :
master: Error: Error reading configuration: Error in configuration file /etc/dovecot/dovecot.conf line 45: Unknown setting: userdb { last_login_key
# If in userdb, set default_fields = last_login_key = last-login/%u/%d/%r/%l/%a Error: auth: Fatal: Invalid userdb template last_login_key = last-login/%u/%d/%r/%l/%a - key must not be empty
what is my wrongs about? thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午02:56:51 [GMT+8] 寫道:
In your userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
Then it will expand into what you want, and will be imported into user's environment.
Aki
On 28/02/2021 05:57 Henry <hl1723@yahoo.com.hk> wrote:
like capture local_port, I using %a will got below error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I using any of $local_port ,'$local_port', "$local_port",
$local_port
I got the database update as $local_port ,'$local_port', "$local_port",
$local_port
at the field column record.Henry (<hl1723@yahoo.com.hk>) 在 2021年2月27日星期六 下午10:57:27 [GMT+8] 寫道:
I already try using other variables , I found it only support "Mail service user variables", no support "Login variables" and "Authentication variables"
below the error when I try to using "Login variables" and "Authentication variables"
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%k': Unknown variable '%k' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%b': Unknown variable '%b' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%m': Unknown variable '%m'
I using centos 8 and dovecot-2.3.13-2.x86_64,
thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月27日星期六 下午07:32:38 [GMT+8] 寫道:
last_login supports some of the variables.
Mail service and mail user variables are supported.
You can try export the auth variables as userdb variables and use $variablename.
Aki
On 27 February 2021 7.29.10 EET, Henry <hl1723@yahoo.com.hk> wrote:
Anyone know then last_login plugins do support standard auth
variables
in var-expand?like %k %a variables. I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, any patch for this? thanks
https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Henry (<hl1723@yahoo.com.hk>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道:
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ?
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四
下午03:04:10
[GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login
https://doc.dovecot.org/configuration_manual/config_file/config_variables/ plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Dear Aka Still no luck, same errorError: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I remark #last_login_key = last-login/%u/%d/%r/%l/%a at plugin , error as belowError: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/
#dovecot.confuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}plugin { quota = maildir:User quota last_login_dict = proxy::lastlogin last_login_key = last-login/%u/%d/%r/%l/%a quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full"}dict { lastlogin = mysql:/etc/dovecot/dovecot-last-login.conf }
# dovecot-sql.conf.extpassword_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user,pw_passwd AS password, concat('*:backend=', pw_shell) as
userdb_quota_rule, 89 AS userdb_uid, 89 AS userdb_gid, pw_dir AS userdb_home ,'last-login/%u/%d/%r/%l/%a' AS last_login_key FROM vpopmail LEFT JOIN limits ON vpopmail.pw_domain = \limits.domain WHERE pw_name = '%n' AND pw_domain='%d' AND (( '%s' = 'smtp' AND (pw_gid & 2048)<>2048 AND COALESCE(disable_smtp,0)!=1) OR \('%s' = 'pop3' AND (pw_gid & 2)<>2 AND COALESCE(disable_pop,0) != 1 ) OR ('%s' = 'imap' AND ('%r'='127.0.0.1') AND \(pw_gid & 4)<>4 AND COALESCE(disable_webmail,0)!=1) OR ('%s' = 'imap' AND ('%r'!='127.0.0.1') AND (pw_gid & 8)<>8 AND COALESCE(disable_imap,0)!=1));
user_query =
SELECT pw_dir AS home, \ 89 AS uid, \ 89 AS gid, \ CONCAT('*:bytes=', REPLACE(SUBSTRING_INDEX(pw_shell, 'S', 1), 'NOQUOTA', '0')) AS quota_rule, \ 'last-login/%u/%d/%r/%l/%a' AS last_login_key \ FROM vpopmail \ WHERE pw_name = '%n' AND pw_domain = '%d' \ AND ('%a'!='995' or !(pw_gid & 2)) \ AND ('%r'!='[WEBMAIL-IP]' or !(pw_gid & 4)) \ AND ('%r'='[WEBMAIL-IP]' or '%a'!='993' or !(pw_gid & 8))
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午04:55:04 [GMT+8] 寫道:
You need to put it in the sql query. SELECT ..., 'last-login/%u/%d/%r/%l/%a' AS last_login_key
Aki
On February 28, 2021 8:12:39 AM UTC, Henry <hl1723@yahoo.com.hk> wrote:
current config as below: userdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}plugin { quota = maildir:User quota last_login_dict = proxy::lastlogin last_login_key = last-login/%u/%d/%r/%l/%a quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full"} ### If I changed as below no help,still no pass the Variable to last_loginuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}userdb { driver = static args = last_login_key=last-login/%u/%d/%r/%l/%a} ###If I changed as below will trouble ,cannot restart dovecotuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext last_login_key=last-login/%u/%d/%r/%l/%a driver = sql}
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午03:56:09 [GMT+8] 寫道:
It goes into the arguments section...
Not having your config, I have to guess, but e.g.
userdb { driver = static args = last_login_key=last-login/%u/%d/%r/%l/%a }
And similarly with other drivers, depending what you use.
Aki
On 28/02/2021 09:53 Henry <hl1723@yahoo.com.hk> wrote:
Dear Aka,
If in userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
then cannot restart dovecot the error below :
master: Error: Error reading configuration: Error in configuration file /etc/dovecot/dovecot.conf line 45: Unknown setting: userdb { last_login_key
# If in userdb, set default_fields = last_login_key = last-login/%u/%d/%r/%l/%a Error: auth: Fatal: Invalid userdb template last_login_key = last-login/%u/%d/%r/%l/%a - key must not be empty
what is my wrongs about? thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午02:56:51 [GMT+8] 寫道:
In your userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
Then it will expand into what you want, and will be imported into user's environment.
Aki
On 28/02/2021 05:57 Henry <hl1723@yahoo.com.hk> wrote:
like capture local_port, I using %a will got below error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I using any of $local_port ,'$local_port', "$local_port",
$local_port
I got the database update as $local_port ,'$local_port', "$local_port",
$local_port
at the field column record.Henry (<hl1723@yahoo.com.hk>) 在 2021年2月27日星期六 下午10:57:27 [GMT+8] 寫道:
I already try using other variables , I found it only support "Mail service user variables", no support "Login variables" and "Authentication variables"
below the error when I try to using "Login variables" and "Authentication variables"
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%k': Unknown variable '%k' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%b': Unknown variable '%b' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%m': Unknown variable '%m'
I using centos 8 and dovecot-2.3.13-2.x86_64,
thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月27日星期六 下午07:32:38 [GMT+8] 寫道:
last_login supports some of the variables.
Mail service and mail user variables are supported.
You can try export the auth variables as userdb variables and use $variablename.
Aki
On 27 February 2021 7.29.10 EET, Henry <hl1723@yahoo.com.hk> wrote:
Anyone know then last_login plugins do support standard auth
variables
in var-expand?like %k %a variables. I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, any patch for this? thanks
https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Henry (<hl1723@yahoo.com.hk>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道:
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ?
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四
下午03:04:10
[GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login
https://doc.dovecot.org/configuration_manual/config_file/config_variables/ plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Dear Aki, I try it as your recommend but still no luck, same error Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I remark #last_login_key = last-login/%u/%d/%r/%l/%a at plugin , error as below Error: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/
There is any error in my configuration? thanks for your help.
## dovecot.confuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}plugin { quota = maildir:User quota last_login_dict = proxy::lastlogin last_login_key = last-login/%u/%d/%r/%l/%a quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full"}dict { lastlogin = mysql:/etc/dovecot/dovecot-last-login.conf }
## dovecot-sql.conf.extpassword_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user,pw_passwd AS password, concat('*:backend=', pw_shell) as
userdb_quota_rule, 89 AS userdb_uid, 89 AS userdb_gid, pw_dir AS userdb_home ,'last-login/%u/%d/%r/%l/%a' AS last_login_key FROM vpopmail LEFT JOIN limits ON vpopmail.pw_domain = \limits.domain WHERE pw_name = '%n' AND pw_domain='%d' AND (( '%s' = 'smtp' AND (pw_gid & 2048)<>2048 AND COALESCE(disable_smtp,0)!=1) OR \('%s' = 'pop3' AND (pw_gid & 2)<>2 AND COALESCE(disable_pop,0) != 1 ) OR ('%s' = 'imap' AND ('%r'='127.0.0.1') AND \(pw_gid & 4)<>4 AND COALESCE(disable_webmail,0)!=1) OR ('%s' = 'imap' AND ('%r'!='127.0.0.1') AND (pw_gid & 8)<>8 AND COALESCE(disable_imap,0)!=1));
user_query =
SELECT pw_dir AS home, \ 89 AS uid, \ 89 AS gid, \ CONCAT('*:bytes=', REPLACE(SUBSTRING_INDEX(pw_shell, 'S', 1), 'NOQUOTA', '0')) AS quota_rule, \ 'last-login/%u/%d/%r/%l/%a' AS last_login_key \ FROM vpopmail \ WHERE pw_name = '%n' AND pw_domain = '%d' \ AND ('%a'!='995' or !(pw_gid & 2)) \ AND ('%r'!='[WEBMAIL-IP]' or !(pw_gid & 4)) \ AND ('%r'='[WEBMAIL-IP]' or '%a'!='993' or !(pw_gid & 8))
#
Henry (<hl1723@yahoo.com.hk>) 在 2021年2月28日星期日 下午05:24:45 [GMT+8] 寫道:
Dear Aka Still no luck, same errorError: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I remark #last_login_key = last-login/%u/%d/%r/%l/%a at plugin , error as belowError: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/
#dovecot.confuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}plugin { quota = maildir:User quota last_login_dict = proxy::lastlogin last_login_key = last-login/%u/%d/%r/%l/%a quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full"}dict { lastlogin = mysql:/etc/dovecot/dovecot-last-login.conf }
# dovecot-sql.conf.extpassword_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user,pw_passwd AS password, concat('*:backend=', pw_shell) as
userdb_quota_rule, 89 AS userdb_uid, 89 AS userdb_gid, pw_dir AS userdb_home ,'last-login/%u/%d/%r/%l/%a' AS last_login_key FROM vpopmail LEFT JOIN limits ON vpopmail.pw_domain = \limits.domain WHERE pw_name = '%n' AND pw_domain='%d' AND (( '%s' = 'smtp' AND (pw_gid & 2048)<>2048 AND COALESCE(disable_smtp,0)!=1) OR \('%s' = 'pop3' AND (pw_gid & 2)<>2 AND COALESCE(disable_pop,0) != 1 ) OR ('%s' = 'imap' AND ('%r'='127.0.0.1') AND \(pw_gid & 4)<>4 AND COALESCE(disable_webmail,0)!=1) OR ('%s' = 'imap' AND ('%r'!='127.0.0.1') AND (pw_gid & 8)<>8 AND COALESCE(disable_imap,0)!=1));
user_query =
SELECT pw_dir AS home, \ 89 AS uid, \ 89 AS gid, \ CONCAT('*:bytes=', REPLACE(SUBSTRING_INDEX(pw_shell, 'S', 1), 'NOQUOTA', '0')) AS quota_rule, \ 'last-login/%u/%d/%r/%l/%a' AS last_login_key \ FROM vpopmail \ WHERE pw_name = '%n' AND pw_domain = '%d' \ AND ('%a'!='995' or !(pw_gid & 2)) \ AND ('%r'!='[WEBMAIL-IP]' or !(pw_gid & 4)) \ AND ('%r'='[WEBMAIL-IP]' or '%a'!='993' or !(pw_gid & 8))
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午04:55:04 [GMT+8] 寫道:
You need to put it in the sql query. SELECT ..., 'last-login/%u/%d/%r/%l/%a' AS last_login_key
Aki
On February 28, 2021 8:12:39 AM UTC, Henry <hl1723@yahoo.com.hk> wrote:
current config as below: userdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}plugin { quota = maildir:User quota last_login_dict = proxy::lastlogin last_login_key = last-login/%u/%d/%r/%l/%a quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full"} ### If I changed as below no help,still no pass the Variable to last_loginuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}userdb { driver = static args = last_login_key=last-login/%u/%d/%r/%l/%a} ###If I changed as below will trouble ,cannot restart dovecotuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext last_login_key=last-login/%u/%d/%r/%l/%a driver = sql}
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午03:56:09 [GMT+8] 寫道:
It goes into the arguments section...
Not having your config, I have to guess, but e.g.
userdb { driver = static args = last_login_key=last-login/%u/%d/%r/%l/%a }
And similarly with other drivers, depending what you use.
Aki
On 28/02/2021 09:53 Henry <hl1723@yahoo.com.hk> wrote:
Dear Aka,
If in userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
then cannot restart dovecot the error below :
master: Error: Error reading configuration: Error in configuration file /etc/dovecot/dovecot.conf line 45: Unknown setting: userdb { last_login_key
# If in userdb, set default_fields = last_login_key = last-login/%u/%d/%r/%l/%a Error: auth: Fatal: Invalid userdb template last_login_key = last-login/%u/%d/%r/%l/%a - key must not be empty
what is my wrongs about? thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午02:56:51 [GMT+8] 寫道:
In your userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
Then it will expand into what you want, and will be imported into user's environment.
Aki
On 28/02/2021 05:57 Henry <hl1723@yahoo.com.hk> wrote:
like capture local_port, I using %a will got below error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I using any of $local_port ,'$local_port', "$local_port",
$local_port
I got the database update as $local_port ,'$local_port', "$local_port",
$local_port
at the field column record.Henry (<hl1723@yahoo.com.hk>) 在 2021年2月27日星期六 下午10:57:27 [GMT+8] 寫道:
I already try using other variables , I found it only support "Mail service user variables", no support "Login variables" and "Authentication variables"
below the error when I try to using "Login variables" and "Authentication variables"
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%k': Unknown variable '%k' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%b': Unknown variable '%b' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%m': Unknown variable '%m'
I using centos 8 and dovecot-2.3.13-2.x86_64,
thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月27日星期六 下午07:32:38 [GMT+8] 寫道:
last_login supports some of the variables.
Mail service and mail user variables are supported.
You can try export the auth variables as userdb variables and use $variablename.
Aki
On 27 February 2021 7.29.10 EET, Henry <hl1723@yahoo.com.hk> wrote:
Anyone know then last_login plugins do support standard auth
variables
in var-expand?like %k %a variables. I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, any patch for this? thanks
https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Henry (<hl1723@yahoo.com.hk>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道:
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ?
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四
下午03:04:10
[GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login
https://doc.dovecot.org/configuration_manual/config_file/config_variables/ plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Did you try
doveadm user account
to see that last_login_key appears in output in correct form?
Aki
On March 2, 2021 2:44:43 PM UTC, Henry <hl1723@yahoo.com.hk> wrote:
Dear Aki, I try it as your recommend but still no luck, same error Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I remark #last_login_key = last-login/%u/%d/%r/%l/%a at plugin , error as below Error: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/
There is any error in my configuration? thanks for your help.
## dovecot.confuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}plugin { quota = maildir:User quota last_login_dict = proxy::lastlogin last_login_key = last-login/%u/%d/%r/%l/%a quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full"}dict { lastlogin = mysql:/etc/dovecot/dovecot-last-login.conf }
## dovecot-sql.conf.extpassword_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user,pw_passwd AS password, concat('*:backend=', pw_shell) as
userdb_quota_rule, 89 AS userdb_uid, 89 AS userdb_gid, pw_dir AS userdb_home ,'last-login/%u/%d/%r/%l/%a' AS last_login_key FROM vpopmail LEFT JOIN limits ON vpopmail.pw_domain = \limits.domain WHERE pw_name = '%n' AND pw_domain='%d' AND (( '%s' = 'smtp' AND (pw_gid & 2048)<>2048 AND COALESCE(disable_smtp,0)!=1) OR \('%s' = 'pop3' AND (pw_gid & 2)<>2 AND COALESCE(disable_pop,0) != 1 ) OR ('%s' = 'imap' AND ('%r'='127.0.0.1') AND \(pw_gid & 4)<>4 AND COALESCE(disable_webmail,0)!=1) OR ('%s' = 'imap' AND ('%r'!='127.0.0.1') AND (pw_gid & 8)<>8 AND COALESCE(disable_imap,0)!=1)); user_query =
SELECT pw_dir AS home, \ 89 AS uid, \ 89 AS gid, \ CONCAT('*:bytes=', REPLACE(SUBSTRING_INDEX(pw_shell, 'S', 1), 'NOQUOTA', '0')) AS quota_rule, \ 'last-login/%u/%d/%r/%l/%a' AS last_login_key \ FROM vpopmail \ WHERE pw_name = '%n' AND pw_domain = '%d' \ AND ('%a'!='995' or !(pw_gid & 2)) \ AND ('%r'!='[WEBMAIL-IP]' or !(pw_gid & 4)) \ AND ('%r'='[WEBMAIL-IP]' or '%a'!='993' or !(pw_gid & 8))#
Henry (<hl1723@yahoo.com.hk>) 在 2021年2月28日星期日 下午05:24:45 [GMT+8] 寫道:
Dear Aka Still no luck, same errorError: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I remark #last_login_key = last-login/%u/%d/%r/%l/%a at plugin , error as belowError: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/
#dovecot.confuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}plugin { quota = maildir:User quota last_login_dict = proxy::lastlogin last_login_key = last-login/%u/%d/%r/%l/%a quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full"}dict { lastlogin = mysql:/etc/dovecot/dovecot-last-login.conf }
# dovecot-sql.conf.extpassword_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user,pw_passwd AS password, concat('*:backend=', pw_shell) as
userdb_quota_rule, 89 AS userdb_uid, 89 AS userdb_gid, pw_dir AS userdb_home ,'last-login/%u/%d/%r/%l/%a' AS last_login_key FROM vpopmail LEFT JOIN limits ON vpopmail.pw_domain = \limits.domain WHERE pw_name = '%n' AND pw_domain='%d' AND (( '%s' = 'smtp' AND (pw_gid & 2048)<>2048 AND COALESCE(disable_smtp,0)!=1) OR \('%s' = 'pop3' AND (pw_gid & 2)<>2 AND COALESCE(disable_pop,0) != 1 ) OR ('%s' = 'imap' AND ('%r'='127.0.0.1') AND \(pw_gid & 4)<>4 AND COALESCE(disable_webmail,0)!=1) OR ('%s' = 'imap' AND ('%r'!='127.0.0.1') AND (pw_gid & 8)<>8 AND COALESCE(disable_imap,0)!=1)); user_query =
SELECT pw_dir AS home, \ 89 AS uid, \ 89 AS gid, \ CONCAT('*:bytes=', REPLACE(SUBSTRING_INDEX(pw_shell, 'S', 1), 'NOQUOTA', '0')) AS quota_rule, \ 'last-login/%u/%d/%r/%l/%a' AS last_login_key \ FROM vpopmail \ WHERE pw_name = '%n' AND pw_domain = '%d' \ AND ('%a'!='995' or !(pw_gid & 2)) \ AND ('%r'!='[WEBMAIL-IP]' or !(pw_gid & 4)) \ AND ('%r'='[WEBMAIL-IP]' or '%a'!='993' or !(pw_gid & 8))Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午04:55:04 [GMT+8] 寫道:
You need to put it in the sql query. SELECT ..., 'last-login/%u/%d/%r/%l/%a' AS last_login_key
Aki
On February 28, 2021 8:12:39 AM UTC, Henry <hl1723@yahoo.com.hk> wrote:
current config as below: userdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}plugin { quota = maildir:User quota last_login_dict = proxy::lastlogin last_login_key = last-login/%u/%d/%r/%l/%a quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full"} ### If I changed as below no help,still no pass the Variable to last_loginuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}userdb { driver = static args = last_login_key=last-login/%u/%d/%r/%l/%a} ###If I changed as below will trouble ,cannot restart dovecotuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext last_login_key=last-login/%u/%d/%r/%l/%a driver = sql}
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午03:56:09 [GMT+8] 寫道:
It goes into the arguments section...
Not having your config, I have to guess, but e.g.
userdb { driver = static args = last_login_key=last-login/%u/%d/%r/%l/%a }
And similarly with other drivers, depending what you use.
Aki
On 28/02/2021 09:53 Henry <hl1723@yahoo.com.hk> wrote:
Dear Aka,
If in userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
then cannot restart dovecot the error below :
master: Error: Error reading configuration: Error in configuration file /etc/dovecot/dovecot.conf line 45: Unknown setting: userdb { last_login_key
# If in userdb, set default_fields = last_login_key = last-login/%u/%d/%r/%l/%a Error: auth: Fatal: Invalid userdb template last_login_key = last-login/%u/%d/%r/%l/%a - key must not be empty
what is my wrongs about? thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午02:56:51 [GMT+8] 寫道:
In your userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
Then it will expand into what you want, and will be imported into user's environment.
Aki
On 28/02/2021 05:57 Henry <hl1723@yahoo.com.hk> wrote:
like capture local_port, I using %a will got below error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I using any of $local_port ,'$local_port', "$local_port",
$local_port
I got the database update as $local_port ,'$local_port', "$local_port",
$local_port
at the field column record.Henry (<hl1723@yahoo.com.hk>) 在 2021年2月27日星期六 下午10:57:27 [GMT+8] 寫道:
I already try using other variables , I found it only support "Mail service user variables", no support "Login variables" and "Authentication variables"
below the error when I try to using "Login variables" and "Authentication variables"
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%k': Unknown variable '%k' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%b': Unknown variable '%b' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%m': Unknown variable '%m'
I using centos 8 and dovecot-2.3.13-2.x86_64,
thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月27日星期六 下午07:32:38 [GMT+8] 寫道:
last_login supports some of the variables.
Mail service and mail user variables are supported.
You can try export the auth variables as userdb variables and use $variablename.
Aki
On 27 February 2021 7.29.10 EET, Henry <hl1723@yahoo.com.hk> wrote:
Anyone know then last_login plugins do support standard auth
variables
in var-expand?like %k %a variables. I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, any patch for this? thanks
https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Henry (<hl1723@yahoo.com.hk>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道:
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ?
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四
下午03:04:10
[GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login
https://doc.dovecot.org/configuration_manual/config_file/config_variables/ plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Dear Aki
Below for output, it is normal? [root@cnt8-testing dovecot]# doveadm user email@testing.com
doveadm user email@testing.comfield valueuid 89gid 89home /home/vpopmail/domains/2/6/x/testing.com/emailmail maildir:~/Maildir:INDEX=/home/vpopmail/domains/2/6/x/testing.com/emailquota_rule *:bytes=19922944last_login_key last-login/email@testing.com/testing.com///0
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年3月2日星期二 下午10:47:39 [GMT+8] 寫道:
Did you try
doveadm user account
to see that last_login_key appears in output in correct form?
Aki
On March 2, 2021 2:44:43 PM UTC, Henry <hl1723@yahoo.com.hk> wrote: Dear Aki, I try it as your recommend but still no luck, same error Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I remark #last_login_key = last-login/%u/%d/%r/%l/%a at plugin , error as below Error: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/
There is any error in my configuration? thanks for your help.
## dovecot.confuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}plugin { quota = maildir:User quota last_login_dict = proxy::lastlogin last_login_key = last-login/%u/%d/%r/%l/%a quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full"}dict { lastlogin = mysql:/etc/dovecot/dovecot-last-login.conf }
## dovecot-sql.conf.extpassword_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user,pw_passwd AS password, concat('*:backend=', pw_shell) as
userdb_quota_rule, 89 AS userdb_uid, 89 AS userdb_gid, pw_dir AS userdb_home ,'last-login/%u/%d/%r/%l/%a' AS last_login_key FROM vpopmail LEFT JOIN limits ON vpopmail.pw_domain = \limits.domain WHERE pw_name = '%n' AND pw_domain='%d' AND (( '%s' = 'smtp' AND (pw_gid & 2048)<>2048 AND COALESCE(disable_smtp,0)!=1) OR \('%s' = 'pop3' AND (pw_gid & 2)<>2 AND COALESCE(disable_pop,0) != 1 ) OR ('%s' = 'imap' AND ('%r'='127.0.0.1') AND \(pw_gid & 4)<>4 AND COALESCE(disable_webmail,0)!=1) OR ('%s' = 'imap' AND ('%r'!='127.0.0.1') AND (pw_gid & 8)<>8 AND COALESCE(disable_imap,0)!=1));
user_query =
SELECT pw_dir AS home, \ 89 AS uid, \ 89 AS gid, \ CONCAT('*:bytes=', REPLACE(SUBSTRING_INDEX(pw_shell, 'S', 1), 'NOQUOTA', '0')) AS quota_rule, \ 'last-login/%u/%d/%r/%l/%a' AS last_login_key \ FROM vpopmail \ WHERE pw_name = '%n' AND pw_domain = '%d' \ AND ('%a'!='995' or !(pw_gid & 2)) \ AND ('%r'!='[WEBMAIL-IP]' or !(pw_gid & 4)) \ AND ('%r'='[WEBMAIL-IP]' or '%a'!='993' or !(pw_gid & 8))
#
Henry (<hl1723@yahoo.com.hk>) 在 2021年2月28日星期日 下午05:24:45 [GMT+8] 寫道:
Dear Aka Still no luck, same errorError: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I remark #last_login_key = last-login/%u/%d/%r/%l/%a at plugin , error as belowError: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/
#dovecot.confuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}plugin { quota = maildir:User quota last_login_dict = proxy::lastlogin last_login_key = last-login/%u/%d/%r/%l/%a quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full"}dict { lastlogin = mysql:/etc/dovecot/dovecot-last-login.conf }
# dovecot-sql.conf.extpassword_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user,pw_passwd AS password, concat('*:backend=', pw_shell) as
userdb_quota_rule, 89 AS userdb_uid, 89 AS userdb_gid, pw_dir AS userdb_home ,'last-login/%u/%d/%r/%l/%a' AS last_login_key FROM vpopmail LEFT JOIN limits ON vpopmail.pw_domain = \limits.domain WHERE pw_name = '%n' AND pw_domain='%d' AND (( '%s' = 'smtp' AND (pw_gid & 2048)<>2048 AND COALESCE(disable_smtp,0)!=1) OR \('%s' = 'pop3' AND (pw_gid & 2)<>2 AND COALESCE(disable_pop,0) != 1 ) OR ('%s' = 'imap' AND ('%r'='127.0.0.1') AND \(pw_gid & 4)<>4 AND COALESCE(disable_webmail,0)!=1) OR ('%s' = 'imap' AND ('%r'!='127.0.0.1') AND (pw_gid & 8)<>8 AND COALESCE(disable_imap,0)!=1));
user_query =
SELECT pw_dir AS home, \ 89 AS uid, \ 89 AS gid, \ CONCAT('*:bytes=', REPLACE(SUBSTRING_INDEX(pw_shell, 'S', 1), 'NOQUOTA', '0')) AS quota_rule, \ 'last-login/%u/%d/%r/%l/%a' AS last_login_key \ FROM vpopmail \ WHERE pw_name = '%n' AND pw_domain = '%d' \ AND ('%a'!='995' or !(pw_gid & 2)) \ AND ('%r'!='[WEBMAIL-IP]' or !(pw_gid & 4)) \ AND ('%r'='[WEBMAIL-IP]' or '%a'!='993' or !(pw_gid & 8))
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午04:55:04 [GMT+8] 寫道:
You need to put it in the sql query. SELECT ..., 'last-login/%u/%d/%r/%l/%a' AS last_login_key
Aki
On February 28, 2021 8:12:39 AM UTC, Henry <hl1723@yahoo.com.hk> wrote:
current config as below: userdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}plugin { quota = maildir:User quota last_login_dict = proxy::lastlogin last_login_key = last-login/%u/%d/%r/%l/%a quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full"} ### If I changed as below no help,still no pass the Variable to last_loginuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql}userdb { driver = static args = last_login_key=last-login/%u/%d/%r/%l/%a} ###If I changed as below will trouble ,cannot restart dovecotuserdb { driver = prefetch}userdb { args = /etc/dovecot/dovecot-sql.conf.ext last_login_key=last-login/%u/%d/%r/%l/%a driver = sql}
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午03:56:09 [GMT+8] 寫道:
It goes into the arguments section...
Not having your config, I have to guess, but e.g.
userdb { driver = static args = last_login_key=last-login/%u/%d/%r/%l/%a }
And similarly with other drivers, depending what you use.
Aki
On 28/02/2021 09:53 Henry <hl1723@yahoo.com.hk> wrote:
Dear Aka,
If in userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
then cannot restart dovecot the error below :
master: Error: Error reading configuration: Error in configuration file /etc/dovecot/dovecot.conf line 45: Unknown setting: userdb { last_login_key
# If in userdb, set default_fields = last_login_key = last-login/%u/%d/%r/%l/%a Error: auth: Fatal: Invalid userdb template last_login_key = last-login/%u/%d/%r/%l/%a - key must not be empty
what is my wrongs about? thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午02:56:51 [GMT+8] 寫道:
In your userdb, set
last_login_key=last-login/%u/%d/%r/%l/%a
Then it will expand into what you want, and will be imported into user's environment.
Aki
On 28/02/2021 05:57 Henry <hl1723@yahoo.com.hk> wrote:
like capture local_port, I using %a will got below error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I using any of $local_port ,'$local_port', "$local_port",
$local_port
I got the database update as $local_port ,'$local_port', "$local_port",
$local_port
at the field column record.Henry (<hl1723@yahoo.com.hk>) 在 2021年2月27日星期六 下午10:57:27 [GMT+8] 寫道:
I already try using other variables , I found it only support "Mail service user variables", no support "Login variables" and "Authentication variables"
below the error when I try to using "Login variables" and "Authentication variables"
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%k': Unknown variable '%k' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%b': Unknown variable '%b' Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%m': Unknown variable '%m'
I using centos 8 and dovecot-2.3.13-2.x86_64,
thanks
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月27日星期六 下午07:32:38 [GMT+8] 寫道:
last_login supports some of the variables.
Mail service and mail user variables are supported.
You can try export the auth variables as userdb variables and use $variablename.
Aki
On 27 February 2021 7.29.10 EET, Henry <hl1723@yahoo.com.hk> wrote:
Anyone know then last_login plugins do support standard auth
variables
in var-expand?like %k %a variables. I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, any patch for this? thanks
https://doc.dovecot.org/configuration_manual/config_file/config_variables/
Henry (<hl1723@yahoo.com.hk>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道:
but I need logging other fields such as port 143 or 993, and tls 1.1 or tls 1.3, client hostname, what should I do it ?
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月18日星期四
下午03:04:10
[GMT+8] 寫道:
On 18/02/2021 08:57 Henry <hl1723@yahoo.com.hk> wrote:
Anyone kwon the last-login plugins can using Authentication variables such as %m mechanism, %a local_port . we want to record this in DB, thanks
You can use this syntax to add further fields for last_login
https://doc.dovecot.org/configuration_manual/config_file/config_variables/ plugin.
map { pattern = shared/last-login/$user/$domain table = last_login value_field = last_login value_type = uint
fields { username = $user domain = $domain rip = $rip } }
Aki
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Looks promising, can you try removing "plugin { last_login_key=.. }" from your configuration file completely and see if it works then?
Aki
On 03/03/2021 10:17 Henry <hl1723@yahoo.com.hk> wrote:
Dear Aki
Below for output, it is normal?
[root@cnt8-testing dovecot]# doveadm user email@testing.com
doveadm user email@testing.com field value uid 89 gid 89 home /home/vpopmail/domains/2/6/x/testing.com/email mail maildir:~/Maildir:INDEX=/home/vpopmail/domains/2/6/x/testing.com/email quota_rule *:bytes=19922944 last_login_key last-login/email@testing.com/testing.com///0
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年3月2日星期二 下午10:47:39 [GMT+8] 寫道:
Did you try
doveadm user account
to see that last_login_key appears in output in correct form?
Aki
On March 2, 2021 2:44:43 PM UTC, Henry <hl1723@yahoo.com.hk> wrote:
Dear Aki,
I try it as your recommend but still no luck, same error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I remark #last_login_key = last-login/%u/%d/%r/%l/%a at plugin , error as below
Error: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/
but when I remove the last_login_key at plugins, error log as below
Error: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/email@testing.com (reply took 0.006 secs (0.000 in dict wait, 0.002 in other ioloops, 0.001 in locks, async-id reply 0.000 secs ago, started on dict-server 0.000 secs ago, took 0.000 secs))
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年3月3日星期三 下午04:23:20 [GMT+8] 寫道:
Looks promising, can you try removing "plugin { last_login_key=.. }" from your configuration file completely and see if it works then?
Aki
On 03/03/2021 10:17 Henry <hl1723@yahoo.com.hk> wrote:
Dear Aki
Below for output, it is normal?
[root@cnt8-testing dovecot]# doveadm user email@testing.com
doveadm user email@testing.com field value uid 89 gid 89 home /home/vpopmail/domains/2/6/x/testing.com/email mail maildir:~/Maildir:INDEX=/home/vpopmail/domains/2/6/x/testing.com/email quota_rule *:bytes=19922944 last_login_key last-login/email@testing.com/testing.com///0
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年3月2日星期二 下午10:47:39 [GMT+8] 寫道:
Did you try
doveadm user account
to see that last_login_key appears in output in correct form?
Aki
On March 2, 2021 2:44:43 PM UTC, Henry <hl1723@yahoo.com.hk> wrote:
Dear Aki,
I try it as your recommend but still no luck, same error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I remark #last_login_key = last-login/%u/%d/%r/%l/%a at plugin , error as below
Error: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/
Can you enable mail_debug=yes
and see what the last_login_key value is when imap session starts? It should show up on logs.
Aki
On 03/03/2021 11:12 Henry <hl1723@yahoo.com.hk> wrote:
but when I remove the last_login_key at plugins, error log as below
Error: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/email@testing.com (reply took 0.006 secs (0.000 in dict wait, 0.002 in other ioloops, 0.001 in locks, async-id reply 0.000 secs ago, started on dict-server 0.000 secs ago, took 0.000 secs))
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年3月3日星期三 下午04:23:20 [GMT+8] 寫道:
Looks promising, can you try removing "plugin { last_login_key=.. }" from your configuration file completely and see if it works then?
Aki
On 03/03/2021 10:17 Henry <hl1723@yahoo.com.hk> wrote:
Dear Aki
Below for output, it is normal?
[root@cnt8-testing dovecot]# doveadm user email@testing.com
doveadm user email@testing.com field value uid 89 gid 89 home /home/vpopmail/domains/2/6/x/testing.com/email mail maildir:~/Maildir:INDEX=/home/vpopmail/domains/2/6/x/testing.com/email quota_rule *:bytes=19922944 last_login_key last-login/email@testing.com/testing.com///0
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年3月2日星期二 下午10:47:39 [GMT+8] 寫道:
Did you try
doveadm user account
to see that last_login_key appears in output in correct form?
Aki
On March 2, 2021 2:44:43 PM UTC, Henry <hl1723@yahoo.com.hk> wrote:
Dear Aki,
I try it as your recommend but still no luck, same error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I remark #last_login_key = last-login/%u/%d/%r/%l/%a at plugin , error as below
Error: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/
oh! cannot see the last_login_key at logging
Mar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Added userdb setting: plugin/quota_rule=*:backend=19922944SMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Effective uid=89, gid=89, home=/home/vpopmail/domains/2/6/x/testing.com/emailMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Quota root: name=User quota backend=maildir args=Mar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Quota rule: root=User quota mailbox=* bytes=19922944 messages=0Mar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Quota grace: root=User quota bytes=1992294 (10%)Mar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Namespace inbox: type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir:INDEX=/home/vpopmail/domains/2/6/x/testing.com/emailMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: maildir++: root=/home/vpopmail/domains/2/6/x/testing.com/email/Maildir, index=/home/vpopmail/domains/2/6/x/testing.com/email, indexpvt=, control=, inbox=/home/vpopmail/domains/2/6/x/testing.com/email/Maildir, alt=Mar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: quota: quota_over_flag check: quota_over_script unset - skippingMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Mailbox INBOX: Mailbox opened because: STATUSMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Mailbox INBOX: Mailbox opened because: SELECTMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Mailbox Drafts: Mailbox opened because: SELECTMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Mailbox Sent: Mailbox opened because: SELECTMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Mailbox Trash: Mailbox opened because: SELECTMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Mailbox 寄件備份: Mailbox opened because: SELECT
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年3月3日星期三 下午05:51:55 [GMT+8] 寫道:
Can you enable mail_debug=yes
and see what the last_login_key value is when imap session starts? It should show up on logs.
Aki
On 03/03/2021 11:12 Henry <hl1723@yahoo.com.hk> wrote:
but when I remove the last_login_key at plugins, error log as below
Error: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/email@testing.com (reply took 0.006 secs (0.000 in dict wait, 0.002 in other ioloops, 0.001 in locks, async-id reply 0.000 secs ago, started on dict-server 0.000 secs ago, took 0.000 secs))
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年3月3日星期三 下午04:23:20 [GMT+8] 寫道:
Looks promising, can you try removing "plugin { last_login_key=.. }" from your configuration file completely and see if it works then?
Aki
On 03/03/2021 10:17 Henry <hl1723@yahoo.com.hk> wrote:
Dear Aki
Below for output, it is normal?
[root@cnt8-testing dovecot]# doveadm user email@testing.com
doveadm user email@testing.com field value uid 89 gid 89 home /home/vpopmail/domains/2/6/x/testing.com/email mail maildir:~/Maildir:INDEX=/home/vpopmail/domains/2/6/x/testing.com/email quota_rule *:bytes=19922944 last_login_key last-login/email@testing.com/testing.com///0
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年3月2日星期二 下午10:47:39 [GMT+8] 寫道:
Did you try
doveadm user account
to see that last_login_key appears in output in correct form?
Aki
On March 2, 2021 2:44:43 PM UTC, Henry <hl1723@yahoo.com.hk> wrote:
Dear Aki,
I try it as your recommend but still no luck, same error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I remark #last_login_key = last-login/%u/%d/%r/%l/%a at plugin , error as below
Error: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/
Dear Aki, For a very busy server ,if using post login script for record last login ,what is the difference between post login script and last login plugins about performance and limitation ? thanks https://wiki.dovecot.org/PostLoginScripting
https://doc.dovecot.org/configuration_manual/lastlogin_plugin/
Henry (<hl1723@yahoo.com.hk>) 在 2021年3月3日星期三 下午06:04:14 [GMT+8] 寫道:
oh! cannot see the last_login_key at logging
Mar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Added userdb setting: plugin/quota_rule=*:backend=19922944SMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Effective uid=89, gid=89, home=/home/vpopmail/domains/2/6/x/testing.com/emailMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Quota root: name=User quota backend=maildir args=Mar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Quota rule: root=User quota mailbox=* bytes=19922944 messages=0Mar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Quota grace: root=User quota bytes=1992294 (10%)Mar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Namespace inbox: type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir:INDEX=/home/vpopmail/domains/2/6/x/testing.com/emailMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: maildir++: root=/home/vpopmail/domains/2/6/x/testing.com/email/Maildir, index=/home/vpopmail/domains/2/6/x/testing.com/email, indexpvt=, control=, inbox=/home/vpopmail/domains/2/6/x/testing.com/email/Maildir, alt=Mar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: quota: quota_over_flag check: quota_over_script unset - skippingMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Mailbox INBOX: Mailbox opened because: STATUSMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Mailbox INBOX: Mailbox opened because: SELECTMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Mailbox Drafts: Mailbox opened because: SELECTMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Mailbox Sent: Mailbox opened because: SELECTMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Mailbox Trash: Mailbox opened because: SELECTMar 3 17:57:10 cnt8-testing dovecot[650754]: imap(email@testing.com)<650774><yFPl3568ZIXfHfj4>: Debug: Mailbox 寄件備份: Mailbox opened because: SELECT
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年3月3日星期三 下午05:51:55 [GMT+8] 寫道:
Can you enable mail_debug=yes
and see what the last_login_key value is when imap session starts? It should show up on logs.
Aki
On 03/03/2021 11:12 Henry <hl1723@yahoo.com.hk> wrote:
but when I remove the last_login_key at plugins, error log as below
Error: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/email@testing.com (reply took 0.006 secs (0.000 in dict wait, 0.002 in other ioloops, 0.001 in locks, async-id reply 0.000 secs ago, started on dict-server 0.000 secs ago, took 0.000 secs))
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年3月3日星期三 下午04:23:20 [GMT+8] 寫道:
Looks promising, can you try removing "plugin { last_login_key=.. }" from your configuration file completely and see if it works then?
Aki
On 03/03/2021 10:17 Henry <hl1723@yahoo.com.hk> wrote:
Dear Aki
Below for output, it is normal?
[root@cnt8-testing dovecot]# doveadm user email@testing.com
doveadm user email@testing.com field value uid 89 gid 89 home /home/vpopmail/domains/2/6/x/testing.com/email mail maildir:~/Maildir:INDEX=/home/vpopmail/domains/2/6/x/testing.com/email quota_rule *:bytes=19922944 last_login_key last-login/email@testing.com/testing.com///0
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年3月2日星期二 下午10:47:39 [GMT+8] 寫道:
Did you try
doveadm user account
to see that last_login_key appears in output in correct form?
Aki
On March 2, 2021 2:44:43 PM UTC, Henry <hl1723@yahoo.com.hk> wrote:
Dear Aki,
I try it as your recommend but still no luck, same error
Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'
If I remark #last_login_key = last-login/%u/%d/%r/%l/%a at plugin , error as below
Error: last_login_dict: Failed to write value: dict-server returned failure: sql dict set: Invalid/unmapped key: shared/last-login/
participants (3)
-
Aki Tuomi
-
Henry
-
Zhang Huangbin