<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">Le 31/03/2022 à 16:08, Aki Tuomi a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:827587595.7592.1648735682669@appsuite-dev-gw2.open-xchange.com">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On 31/03/2022 17:00 <a class="moz-txt-link-abbreviated" href="mailto:itanguy@univ-brest.fr">itanguy@univ-brest.fr</a> wrote:
Hello,
is there any way to rate limit submission mail (counting per user) when
using Dovecot/Submission (no Postfix)?
Using a milter seems impossible.
Using Dovecot Events seems "too" global (not per users discrimination).
Maybe rate-limiting has to be external and then include in the pass_db
query ?
Thank your for any hints.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Hi!
Dovecot submission is not an MTA, it *always* requires something behind. You cannot use milters with it. If your MTA supports XFORWARD/XCLIENT you can use submission_relay_trusted to allow this information to be forwarded to the MTA.
Aki</pre>
</blockquote>
<p>Thanks for your answer.<br>
We find better to count at the Submission Step.</p>
<p>I try to use metric, but don't find yet the good parameters to
see submission events :</p>
<pre>metric submission_counter {
filter = event=smtp_submit_finished
fields = mail_from recipients data_size
}
</pre>
Submit some mails and then doveadm stats dump.<br>
<p>result stay null :</p>
<p>doveadm stats dump<br>
metric_name field count sum min max
avg median stddev %95<br>
submission_counter duration 0 0 0
0 0.00 0 0.000<br>
submission_counter mail_from 0 0 0
0 0.00 0 0.000<br>
submission_counter recipients 0 0 0
0 0.00 0 0.000<br>
submission_counter data_size 0 0 0
0 0.00 0 0.000<br>
</p>
<blockquote type="cite"
cite="mid:827587595.7592.1648735682669@appsuite-dev-gw2.open-xchange.com">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Ismaël Tanguy
</pre>
</blockquote>
</blockquote>
</body>
</html>