<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 17. Jan 2022, at 21.25, Dan Conway <<a href="mailto:darkc0de@archnix6.net" class="">darkc0de@archnix6.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" class="">
<div class=""><p class="">Hello,</p><p class="">When extracting client_id information from the client connection
(i.e. setting imap_id_log = *) the information is directly logged
by Dovecot as such:<br class="">
ID sent: name=Thunderbird, version=91.5.0<br class="">
<br class="">
My question is, Is it possible to export/set this information in a
checkpassword script or a postlogin script?</p>
<table class="align-default docutils" style="text-align: center;
margin: 10px auto; border: 1px solid rgb(136, 136, 136);
border-collapse: collapse; box-shadow: rgb(238, 238, 238) 2px 2px
4px; color: rgb(62, 67, 73); font-family: Roboto; font-size: 17px;
font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: 400; letter-spacing:
normal; orphans: 2; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); text-decoration-thickness:
initial; text-decoration-style: initial; text-decoration-color:
initial;">
<tbody class="">
<tr class="row-odd">
<td style="text-align: left; padding: 0.25em 0.7em; border:
1px solid rgb(136, 136, 136);" class=""><div style="margin-top: 0px; margin-bottom: 0px; line-height: 1.4em;" class="">client_id</div>
</td>
<td style="text-align: left; padding: 0.25em 0.7em; border:
1px solid rgb(136, 136, 136);" class=""><p style="margin-top: 0px; hyphens: auto; line-height:
1.4em;" class="">If<span class=""> </span><a class="internal reference" href="https://doc.dovecot.org/settings/core/#core_setting-imap_id_retain" title="core_setting-imap_id_retain" style="color: rgb(0,
75, 107); text-decoration: none; border-bottom: 1px
dotted rgb(0, 75, 107);"><code class=" literal dovecot_core
xref docutils dovecot_core-ref notranslate" style="font-family: Consolas, Menlo, "DejaVu Sans
Mono", "Bitstream Vera Sans Mono",
monospace; font-size: 0.9em; background-color:
rgb(251, 251, 251); color: rgb(34, 34, 34);
font-weight: bold; border-bottom: 1px solid rgb(255,
255, 255);"><span class="pre" style="hyphens: none;">imap_id_retain</span></code></a><span class=""> </span>is
enabled this variable is populated with the client ID
request as IMAP arglist.</p>
</td>
</tr>
</tbody>
</table><p class="">I've enabled both checkpassword and postlogin on a test server,
as well as 'imap_id_retain' set to 'yes'. I wrote a simple Perl
script that dumps everything in %ENV as well as @ARGV for
checkpassword and postlogin, but I don't see any occurrences of ID
information. I've also tried to see if I could supply that
variable in dovecot.conf by setting 'client_id' as a parameter,
but that didn't seem to do the trick either.<br class="">
</p>
<pre class="">passdb {</pre>
<pre class="">...</pre>
<pre class=""> # Doesn't work
args = /usr/local/bin/checkpassword.pl client_id
# Doesn't work
args = /usr/local/bin/checkpassword.pl %{client_id}
</pre>
<pre class="">...</pre>
<pre class="">}
</pre><p class="">What am I missing? Is it possible to get these variables into an
external script that checkpassword or postlogin executes?</p><div class=""><br class=""></div></div></div></blockquote><br class=""></div><div>Is your client sending IMAP ID pre login?</div><div><br class=""></div><div>Sami</div><div><br class=""></div><br class=""></body></html>