<div dir="ltr"><div dir="ltr">Mark,<div><br></div><div>There's a performance fix in this commit that should help with most of this.  The crashing is likely from partially written messages in the milterin queue as a result of not writing the file in a single pass.  I hope to get a few more issues resolved before doing another release.</div><div><br></div><div><a href="https://github.com/MailScanner/v5/commit/5083b4e0f0eecbec84a5ab94538b0ffbe35f90f1">https://github.com/MailScanner/v5/commit/5083b4e0f0eecbec84a5ab94538b0ffbe35f90f1</a><br></div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Oct 7, 2018 at 2:17 PM Mark Sapiro <<a href="mailto:mark@msapiro.net">mark@msapiro.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This is basically just a report of things I encountered with the milter<br>
option in MailScanner 5.1.1. I don't think I have enough information to<br>
actually debug these issues, and for now at least, I have reverted to<br>
the Postfix hold queue option.<br>
<br>
I first set up the milter option on a local test server. Mail wasn't<br>
being scanned, but this was because I was submitting the test mail from<br>
localhost. When I submitted mail remotely, all seemed to work well, so I<br>
then set up the milter option on my not too busy production server. I<br>
set it up at about 9:30 p.m. on Friday. It seemed to be working well.<br>
<br>
At some point Saturday, I noticed some delays so I began to investigate.<br>
<br>
I saw this in mail.log<br>
<br>
Oct  6 08:35:50 sbh16 MailScanner[3301]: Requeue: 2BA30E13AF.AAFEC to<br>
DB2E81180AC8<br>
Oct  6 08:35:50 sbh16 postfix/smtpd[6686]: connect from<br>
localhost.localdomain[127.0.0.1]<br>
Oct  6 08:36:20 sbh16 postfix/smtpd[6686]: 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>
Oct  6 08:36:20 sbh16 postfix/smtpd[6686]: 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>
This seemed to be a one time occurrence. Mail was processed normally until<br>
<br>
Oct  6 11:16:39 sbh16 MailScanner[7312]: Requeue: B679E47A37.A9D7F to<br>
A7D441181110<br>
Oct  6 11:16:39 sbh16 postfix/smtpd[27861]: connect from<br>
localhost.localdomain[127.0.0.1]<br>
...<br>
Oct  6 11:17:09 sbh16 postfix/smtpd[27861]: 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>
Oct  6 11:17:09 sbh16 postfix/smtpd[27861]: 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>
Oct  6 11:17:10 sbh16 postfix/smtpd[27861]: connect from<br>
unknown[185.36.81.145]<br>
Oct  6 11:17:40 sbh16 postfix/smtpd[27861]: 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>
Oct  6 11:17:40 sbh16 postfix/smtpd[27861]: 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>
at which point these seemed to occur with every connect even though<br>
'netstat -lntp' showed the milter listening on port<br>
<br>
About an hour later, I reverted to the non-milter configuration and<br>
things became normal again.<br>
<br>
Also during the 14 hours that the milter was configured, I saw 4 of these<br>
<br>
Oct  5 22:58:44 sbh16 MailScanner[7746]: Quarantined message ... as it<br>
caused MailScanner to crash several times<br>
<br>
I have those 4 messages and have reprocessed them following reversion to<br>
the hold queue method with no problem. I also processed them through my<br>
test server running the milter without crashing MailScanner. On the test<br>
server, I did see<br>
<br>
Oct  6 15:21:39 msapiro MailScanner[13351]: Unable to kick message<br>
/var/spool/MailScanner/milterout/5ECA5340128, will retry soon...<br>
<br>
on 3 of the four messages which remained in milterout, but this may have<br>
been related to the fact that I submitted all 4 in one manual smtp<br>
session and then never submitted any more messages before reverting that<br>
to the hold queue method.<br>
<br>
So, I don't think that the "caused MailScanner to crash" issue was<br>
related to the actual message content.<br>
<br>
My milter config overrides defaults with<br>
<br>
---------------------------------<br>
Incoming Queue Dir = /var/spool/MailScanner/milterin<br>
Outgoing Queue Dir = /var/spool/MailScanner/milterout<br>
MTA = msmail<br>
MSMail Queue Type = short<br>
Milter Scanner = yes<br>
Milter Max Children = 1<br>
---------------------------------<br>
<br>
I wonder if people are successfully using this in production or if<br>
people have seen issues such as 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>
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 dir="ltr"><div dir="ltr">Shawn Iverson, CETL<div>Director of Technology</div><div>Rush County Schools</div><div>765-932-3901 x1171</div><div><a href="mailto:iversons@rushville.k12.in.us" target="_blank">iversons@rushville.k12.in.us</a></div><div><br></div><div><img width="96" height="96" style="font-size: 12.8px;"><img width="89" height="96"></div><div><img style="font-size: 12.8px;"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>