<div dir="ltr">Mark,<div><br></div><div>I wonder if it makes sense for me to refactor the milter to scale within a defined range.</div><div><br></div><div><br></div><div>It would be possible, for example to have the following</div><div>Milter Min Children</div><div>Milter Max Children</div><div><br></div><div>In this configuration, I could default the Min to 10 under normal conditions, but set Max to 100.</div><div><br></div><div>The key is that the miltier must always have a child available to serve a connection, so it must theoretically be able to scale to whatever postfix can handle concurrently.</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 8, 2018 at 9:23 PM Mark Sapiro <<a href="mailto:mark@msapiro.net">mark@msapiro.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">To recap, with<br>
<br>
Milter Max Children = 1<br>
<br>
I was seeing messages like:<br>
<br>
Nov  8 04:21:32 sbh16 postfix/smtpd[5059]: warning: milter<br>
inet:<a href="http://127.0.0.1:33333" rel="noreferrer" target="_blank">127.0.0.1:33333</a>: can't read SMFIC_OPTNEG reply packet header:<br>
Connection reset by peer<br>
Nov  8 04:21:32 sbh16 postfix/smtpd[5059]: warning: milter<br>
inet:<a href="http://127.0.0.1:33333" rel="noreferrer" target="_blank">127.0.0.1:33333</a>: read error in initial handshake<br>
<br>
and<br>
<br>
Nov  8 04:21:51 sbh16 postfix/smtpd[5064]: warning: milter<br>
inet:<a href="http://127.0.0.1:33333" rel="noreferrer" target="_blank">127.0.0.1:33333</a>: can't read SMFIC_OPTNEG reply packet header:<br>
Connection timed out<br>
Nov  8 04:21:51 sbh16 postfix/smtpd[5064]: warning: milter<br>
inet:<a href="http://127.0.0.1:33333" rel="noreferrer" target="_blank">127.0.0.1:33333</a>: read error in initial handshake<br>
<br>
in my mail.log. I increased the setting to<br>
<br>
Milter Max Children = 10<br>
<br>
and that seemed to eliminate the problem.<br>
<br>
However, this morning I was hit by a mass spam attack resulting in 73 of<br>
these connects<br>
<br>
Nov  8 04:21:26 sbh16 postfix/smtpd[5028]: connect from<br>
unknown[46.229.220.205]<br>
<br>
within 14 seconds and 3 of these produced the "Connection reset by peer"<br>
message and 39 produced the "Connection timed out" message for a total<br>
of 42 "read errors".<br>
<br>
I wonder if setting smtpd_client_connection_count_limit in Postfix to a<br>
smaller value, maybe even 10, would avoid this.<br>
<br>
-- <br>
Mark Sapiro <<a href="mailto:mark@msapiro.net" target="_blank">mark@msapiro.net</a>>        The highway is for gamblers,<br>
San Francisco Bay Area, California    better use your sense - B. Dylan<br>
<br>
<br>
<br>
-- <br>
MailScanner mailing list<br>
<a href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.info</a><br>
<a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" rel="noreferrer" target="_blank">http://lists.mailscanner.info/mailman/listinfo/mailscanner</a><br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">Shawn Iverson, CETL<div>Director of Technology</div><div>Rush County Schools</div><div>765-932-3901 option 7</div><div><a href="mailto:iversons@rushville.k12.in.us" target="_blank">iversons@rushville.k12.in.us</a></div><div><br></div><div><img src="https://docs.google.com/uc?export=download&id=0Bw5iD0ToYvs_cy1OZFNIZ0drYVU&revid=0Bw5iD0ToYvs_UitIcHVIWkJVVTl2VGpxVUE0d0FQcHBIRXk4PQ" width="96" height="96" style="font-size:12.8px"><img src="https://docs.google.com/uc?export=download&id=0Bw5iD0ToYvs_Zkh4eEs3R01yWXc&revid=0Bw5iD0ToYvs_QWpBK2Y2ajJtYjhOMDRFekZwK2xOamk5Q3Y0PQ" width="89" height="96"></div><div><img src="https://docs.google.com/uc?export=download&id=1aBrlQou4gjB04FY-twHN_0Dn3GHVNxqa&revid=0Bw5iD0ToYvs_RnQ0eDhHcm95WHBFdkNRbXhQRXpoYkR6SEEwPQ" style="font-size:12.8px"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>