<html><head></head><body><div class="ydpd4c7a442yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
<div dir="ltr" data-setdir="false">current config as below:</div><div><br></div><div dir="ltr" data-setdir="false"><div><div>userdb {</div><div> driver = prefetch</div><div>}</div><div>userdb {</div><div> args = /etc/dovecot/dovecot-sql.conf.ext</div><div> driver = sql</div><div>}</div><div dir="ltr" data-setdir="false"><div><div>plugin {</div><div> quota = maildir:User quota<br></div><div> last_login_dict = proxy::lastlogin<br></div><div> last_login_key = last-login/%u/%d/%r/%l/%a</div><div> quota_status_success = DUNNO<br></div><div> quota_status_nouser = DUNNO</div><div> quota_status_overquota = "552 5.2.2 Mailbox is full"</div><div>}</div><div><br style="color: rgb(0, 0, 0); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"></div></div></div></div><div>###<br></div><div dir="ltr" data-setdir="false"><div><div dir="ltr" data-setdir="false">If I changed as below no help,still no pass the<span> Variable to last_login</span></div><div>userdb {</div><div> driver = prefetch</div><div>}</div><div>userdb {</div><div> args = /etc/dovecot/dovecot-sql.conf.ext</div><div> driver = sql</div><div>}</div><div>userdb {</div><div> driver = static</div><div> args = last_login_key=last-login/%u/%d/%r/%l/%a</div><div>}</div><div dir="ltr" data-setdir="false"><div><div><br></div></div>###</div></div><div><div dir="ltr" data-setdir="false">If I changed as below will trouble ,cannot restart dovecot</div><div>userdb {</div><div> driver = prefetch</div><div>}</div><div>userdb {</div><div dir="ltr" data-setdir="false"> args = /etc/dovecot/dovecot-sql.conf.ext <span><span style="color: rgb(0, 0, 0); font-family: Helvetica Neue, Helvetica, Arial, sans-serif;">last_login_key=last-login/%u/%d/%r/%l/%a</span></span></div><div> driver = sql</div><div>}</div><div><br></div></div><br></div><div><br></div><div><br></div><div><br></div><br></div>
</div><div id="yahoo_quoted_5183298931" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
Aki Tuomi (<aki.tuomi@open-xchange.com>) 在 2021年2月28日星期日 下午03:56:09 [GMT+8] 寫道:
</div>
<div><br></div>
<div><br></div>
<div><div dir="ltr">It goes into the arguments section...<br clear="none"><br clear="none">Not having your config, I have to guess, but e.g.<br clear="none"><br clear="none">userdb {<br clear="none"> driver = static<br clear="none"> args = last_login_key=last-login/%u/%d/%r/%l/%a<br clear="none">}<br clear="none"><br clear="none">And similarly with other drivers, depending what you use. <br clear="none"><br clear="none">Aki<br clear="none"><div class="yqt0683580826" id="yqtfd78374"><br clear="none">> On 28/02/2021 09:53 Henry <<a shape="rect" ymailto="mailto:hl1723@yahoo.com.hk" href="mailto:hl1723@yahoo.com.hk">hl1723@yahoo.com.hk</a>> wrote:<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> Dear Aka,<br clear="none">> <br clear="none">> If in userdb, set<br clear="none">> <br clear="none">> last_login_key=last-login/%u/%d/%r/%l/%a<br clear="none">> <br clear="none">> then cannot restart dovecot the error below :<br clear="none">> <br clear="none">> master: Error: Error reading configuration: Error in configuration file /etc/dovecot/dovecot.conf line 45: Unknown setting: userdb { last_login_key<br clear="none">> <br clear="none">> #<br clear="none">> If in userdb, set<br clear="none">> default_fields = last_login_key = last-login/%u/%d/%r/%l/%a<br clear="none">> Error:<br clear="none">> auth: Fatal: Invalid userdb template last_login_key = last-login/%u/%d/%r/%l/%a - key must not be empty<br clear="none">> <br clear="none">> <br clear="none">> what is my wrongs about? thanks<br clear="none">> <br clear="none">> <br clear="none">> Aki Tuomi (<<a shape="rect" ymailto="mailto:aki.tuomi@open-xchange.com" href="mailto:aki.tuomi@open-xchange.com">aki.tuomi@open-xchange.com</a>>) 在 2021年2月28日星期日 下午02:56:51 [GMT+8] 寫道:<br clear="none">> <br clear="none">> <br clear="none">> In your userdb, set <br clear="none">> <br clear="none">> last_login_key=last-login/%u/%d/%r/%l/%a<br clear="none">> <br clear="none">> Then it will expand into what you want, and will be imported into user's environment.<br clear="none">> <br clear="none">> Aki<br clear="none">> <br clear="none">> <br clear="none">> > On 28/02/2021 05:57 Henry <<a shape="rect" ymailto="mailto:hl1723@yahoo.com.hk" href="mailto:hl1723@yahoo.com.hk">hl1723@yahoo.com.hk</a>> wrote:<br clear="none">> > <br clear="none">> > <br clear="none">> > like capture local_port, I using %a will got below error<br clear="none">> > <br clear="none">> > Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%a': Unknown variable '%a'<br clear="none">> > <br clear="none">> > <br clear="none">> > If I using any of $local_port ,'$local_port', "$local_port", `$local_port`<br clear="none">> > <br clear="none">> > I got the database update as $local_port ,'$local_port', "$local_port", `$local_port` at the field column record.<br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > Henry (<<a shape="rect" ymailto="mailto:hl1723@yahoo.com.hk" href="mailto:hl1723@yahoo.com.hk">hl1723@yahoo.com.hk</a>>) 在 2021年2月27日星期六 下午10:57:27 [GMT+8] 寫道:<br clear="none">> > <br clear="none">> > <br clear="none">> > I already try using other variables , I found it only support "Mail service user variables", no support "Login variables" and "Authentication variables"<br clear="none">> > <br clear="none">> > below the error when I try to using "Login variables" and "Authentication variables"<br clear="none">> > <br clear="none">> > Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%k': Unknown variable '%k'<br clear="none">> > Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%b': Unknown variable '%b'<br clear="none">> > Error: Failed to expand plugin setting last_login_key = 'last-login/%u/%d/%r/%l/%m': Unknown variable '%m'<br clear="none">> > <br clear="none">> > I using centos 8 and dovecot-2.3.13-2.x86_64,<br clear="none">> > <br clear="none">> > <br clear="none">> > thanks<br clear="none">> > <br clear="none">> > Aki Tuomi (<<a shape="rect" ymailto="mailto:aki.tuomi@open-xchange.com" href="mailto:aki.tuomi@open-xchange.com">aki.tuomi@open-xchange.com</a>>) 在 2021年2月27日星期六 下午07:32:38 [GMT+8] 寫道:<br clear="none">> > <br clear="none">> > <br clear="none">> > last_login supports some of the variables. <br clear="none">> > <br clear="none">> > <br clear="none">> > Mail service and mail user variables are supported. <br clear="none">> > <br clear="none">> > You can try export the auth variables as userdb variables and use $variablename. <br clear="none">> > <br clear="none">> > Aki<br clear="none">> > <br clear="none">> > <br clear="none">> > On 27 February 2021 7.29.10 EET, Henry <<a shape="rect" ymailto="mailto:hl1723@yahoo.com.hk" href="mailto:hl1723@yahoo.com.hk">hl1723@yahoo.com.hk</a>> wrote:<br clear="none">> > > <br clear="none">> > >Anyone know then last_login plugins do support standard auth variables<br clear="none">> > >in var-expand?like %k %a variables.<br clear="none">> > >I need logging other fields such as port 143 or 993, and tls 1.1 or tls<br clear="none">> > >1.3, client hostname,<br clear="none">> > >any patch for this? thanks<br clear="none">> > ><br clear="none">> > ><a shape="rect" href="https://doc.dovecot.org/configuration_manual/config_file/config_variables/" target="_blank">https://doc.dovecot.org/configuration_manual/config_file/config_variables/</a><br clear="none">> > > Henry (<<a shape="rect" ymailto="mailto:hl1723@yahoo.com.hk" href="mailto:hl1723@yahoo.com.hk">hl1723@yahoo.com.hk</a>>) 在 2021年2月19日星期五 下午12:15:10 [GMT+8] 寫道: <br clear="none">> > > <br clear="none">> > >but I need logging other fields such as port 143 or 993, and tls 1.1 or<br clear="none">> > >tls 1.3, client hostname, what should I do it ?<br clear="none">> > ><a shape="rect" href="https://doc.dovecot.org/configuration_manual/config_file/config_variables/" target="_blank">https://doc.dovecot.org/configuration_manual/config_file/config_variables/</a><br clear="none">> > ><br clear="none">> > >Aki Tuomi (<<a shape="rect" ymailto="mailto:aki.tuomi@open-xchange.com" href="mailto:aki.tuomi@open-xchange.com">aki.tuomi@open-xchange.com</a>>) 在 2021年2月18日星期四 下午03:04:10<br clear="none">> > >[GMT+8] 寫道: <br clear="none">> > > <br clear="none">> > > <br clear="none">> > >> On 18/02/2021 08:57 Henry <<a shape="rect" ymailto="mailto:hl1723@yahoo.com.hk" href="mailto:hl1723@yahoo.com.hk">hl1723@yahoo.com.hk</a>> wrote:<br clear="none">> > >> <br clear="none">> > >> <br clear="none">> > >> <br clear="none">> > >> <br clear="none">> > >> Anyone kwon the last-login plugins can using Authentication variables<br clear="none">> > >such as %m mechanism, %a local_port .<br clear="none">> > >> we want to record this in DB, thanks<br clear="none">> > ><br clear="none">> > >You can use this syntax to add further fields for last_login plugin.<br clear="none">> > ><br clear="none">> > > map {<br clear="none">> > > pattern = shared/last-login/$user/$domain<br clear="none">> > > table = last_login<br clear="none">> > > value_field = last_login<br clear="none">> > > value_type = uint<br clear="none">> > ><br clear="none">> > > fields {<br clear="none">> > > username = $user<br clear="none">> > > domain = $domain<br clear="none">> > > rip = $rip<br clear="none">> > > }<br clear="none">> > >} <br clear="none">> > ><br clear="none">> > >Aki<br clear="none">> > <br clear="none">> > > <br clear="none">> > <br clear="none">> > -- <br clear="none">> > Sent from my Android device with K-9 Mail. Please excuse my brevity.<br clear="none">> ><br clear="none"></div></div></div>
</div>
</div></body></html>