<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Sorry for the noise.<br>
<br>
Allowing dovecot server on the postfix relayhost
(<a class="moz-txt-link-freetext" href="https://www.postfix.org/postconf.5.html#smtpd_authorized_xclient_hosts">https://www.postfix.org/postconf.5.html#smtpd_authorized_xclient_hosts</a>)
permit to retrieve sasl_username in the log :<br>
</p>
<pre>Nov 10 10:53:13 relayhost postfix/smtpd[2749948]: 834AE3F8AD: client=dovecot-submission[0.0.0.0], sasl_method=XCLIENT, <a class="moz-txt-link-abbreviated" href="mailto:sasl_username=submitter@example.com">sasl_username=submitter@example.com</a>
</pre>
I'm wondering if this sasl_username can now be retrieved by a
milter.<br>
<p>But it's outside of the list.</p>
<p><br>
</p>
<div class="moz-cite-prefix">Le 10/11/2022 à 11:56,
<a class="moz-txt-link-abbreviated" href="mailto:itanguy@univ-brest.fr">itanguy@univ-brest.fr</a> a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:c2025c2b-c2f5-baef-486b-35665508b6fb@univ-brest.fr">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>Hello,</p>
<p>We would like to use Dovecot Submission to have less queues to
maintain.<br>
The relayhost (Postfix) after Dovecot routes mail by sender_map,
so authenticated user, not the "mail from" because .<br>
<br>
For what we've seen, we can't use receive header to retrieve
this authenticated_user.</p>
<p>Example of header :<br>
</p>
<pre> Received: from mailhost ([0.0.0.0])
by submission.host with ESMTPSA
id submission-id
(envelope-from <a class="moz-txt-link-rfc2396E" href="mailto:myadress@example.com" moz-do-not-send="true"><myadress@example.com></a>)
for <a class="moz-txt-link-rfc2396E" href="mailto:myadress@example.com" moz-do-not-send="true"><myadress@example.com></a>; Thu, 9 Nov 2022 08:27:41 +0000</pre>
<p>So we've thought to use X-client, but reading the doc seems
that's not the a good way :<br>
<i><a class="moz-txt-link-freetext"
href="https://doc.dovecot.org/settings/core/"
moz-do-not-send="true">https://doc.dovecot.org/settings/core/</a></i><br>
</p>
<pre> <span class="sig-name descname"><span class="pre">- submission_relay_trusted</span></span>
If enabled, the relay server is trusted.
Determines whether we try to send (Postfix-specific) XCLIENT data to the
relay server (only if enabled).
</pre>
But, XCLIENT for Submission seems to not transfer LOGIN :<br>
<i><a class="moz-txt-link-freetext"
href="https://doc.dovecot.org/settings/core/"
moz-do-not-send="true">https://doc.dovecot.org/settings/core/</a><br>
</i>
<pre> XCLIENT command can be used to override:
Session ID
Client IP and port (<code class="docutils literal notranslate"><span class="pre">%{rip}</span></code>, <code class="docutils literal notranslate"><span class="pre">%{rport}</span></code>)
HELO - Overrides what the client sent earlier in the EHLO command
LOGIN - Currently unused
PROTO - Currently unused</pre>
<blockquote>
<div>
<pre><code class="docutils literal notranslate"><span class="pre">forward_*</span></code> fields can be sent to auth process’s passdb lookup</pre>
<pre>The trust is always checked against the connecting IP address.
Except if HAProxy is used, then the original client IP address is used.
</pre>
</div>
</blockquote>
Do you know another way to inform the relayhost of submission of
the authenticated_user?<br>
<br>
Thanks<br>
<br>
Ismaël TANGUY </blockquote>
</body>
</html>