<div dir="ltr"><span style="font-size:12.8px;white-space:nowrap">Wolfgang,</span><br><div><span style="font-size:12.8px;white-space:nowrap"><br></span></div><div><span style="font-size:12.8px;white-space:nowrap">Would you do me a favor and test this PR in your setup?</span></div><div><span style="font-size:12.8px;white-space:nowrap"><br></span></div><div><span style="font-size:12.8px;white-space:nowrap"><a href="https://github.com/MailScanner/v4/pull/42/files">https://github.com/MailScanner/v4/pull/42/files</a></span><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 16, 2015 at 3:53 PM, Wolfgang Baudler <span dir="ltr"><<a href="mailto:wbaudler@gb.nrao.edu" target="_blank">wbaudler@gb.nrao.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> On 11/05/2015 11:05 AM, Wolfgang Baudler wrote:<br>
>><br>
>> no difference in log messages, except the senders domain and address of<br>
>> course.<br>
>><br>
>> internal log example:<br>
>> Nov  5 13:50:58 io MailScanner[24033]: Message tA5IopES005503 from<br>
>> 192.33.116.115 (<a href="mailto:wbaudler@gb.nrao.edu">wbaudler@gb.nrao.edu</a>) to <a href="http://gb.nrao.edu" rel="noreferrer" target="_blank">gb.nrao.edu</a> is not spam,<br>
>> SpamAssassin (score=-199.008, required 5, autolearn=disabled,<br>
>> TEST_RULE_AA<br>
>> 1.00, NRAO_HEADER_PRESENT -100.00, TVD_SPACE_RATIO 0.00,<br>
>> T_RP_MATCHES_RCVD<br>
>> -0.01, USER_IN_WHITELIST -100.00)<br>
>><br>
>> external log example:<br>
>> Nov  5 13:55:47 io MailScanner[24004]: Message tA5ItQmr006622 from<br>
>> 98.138.229.70 (<a href="mailto:wbaudler@yahoo.com">wbaudler@yahoo.com</a>) to <a href="http://gb.nrao.edu" rel="noreferrer" target="_blank">gb.nrao.edu</a> is not spam,<br>
>>  SpamAssassin (score=0.902, required 5, autolearn=disabled,<br>
>> DKIM_ADSP_CUSTOM_MED 0.00, DKIM_SIGNED 0.10, FREEMAIL_FROM 0.00,<br>
>> LOCAL_ID_JAVAMAIL 1.00, NML_ADSP_CUSTOM_MED 1.20, RCVD_IN_DNSWL_LOW<br>
>> -0.70, RCVD_IN_MSPIKE_H3 -0.70, SPF_PASS -0.00, T_DKIM_INVALID 0.01,<br>
>> T_RP_MATCHES_RCVD -0.01)<br>
>><br>
>> The TEST_RULE_AA test result is missing in the external example. The<br>
>> message sent was completely identical.<br>
><br>
><br>
> At this point I am at a loss unless your "Max SpamAssassin Size" setting<br>
> and your test message size are such that the extra headers from the<br>
> remote source push the test string out of range. This seems highly<br>
> unlikely.<br>
><br>
> It seems this might be a spamassassin bug triggered by something in the<br>
> message headers from the remote servers, but this seems unlikely too.<br>
><br>
> --<br>
> Mark Sapiro <<a href="mailto:mark@msapiro.net">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>
After doing some extended chasing I have an update on this issue.<br>
<br>
It seems that the firing or non-firing of body rules depends on the MUA<br>
used to send the message. In particular on the fact that some MUA add an<br>
empty line (0x0a newline) at the end of the body when<br>
sending and some do not.<br>
<br>
Those that add the extra line with an newline will fire body rules<br>
correctly if processed through Mailscanner, those that do not have the<br>
extra line will not fire.<br>
<br>
Some particular real spam messages seem to consistently lack this empty<br>
line and thus get not tagged correctly.<br>
<br>
I have not figured out exactly where this missing newline throws<br>
MailScanner off, but I was able to implement a crude fix by modifying the<br>
loop of the ReadBody function in SMDiskStore.pm like this (we are using<br>
sendmail with MailScanner):<br>
<br>
  while(defined($line = <$dh>) && $size<$max) {<br>
    push @{$body}, $line;<br>
    $size += length($line);<br>
    #print STDERR "Line read2 is ****" . $line . "****\n";<br>
  }<br>
  $lastlineread = $line;<br>
  push @{$body}, "\n";<br>
<br>
Only the last line was added, which pushes an unconditional newline at the<br>
end of the body just read. After that modification all body rules fire<br>
correctly as expected.<br>
<br>
Hopefully someone more familiar with the MailScanner code can come up with<br>
a proper patch to fix this issue?<br>
<span class="HOEnZb"><font color="#888888"><br>
Wolfgang<br>
<br>
<br>
<br>
<br>
--<br>
MailScanner mailing list<br>
<a href="mailto:mailscanner@lists.mailscanner.info">mailscanner@lists.mailscanner.info</a><br>
<a href="http://lists.mailscanner.info/listinfo/mailscanner" rel="noreferrer" target="_blank">http://lists.mailscanner.info/listinfo/mailscanner</a><br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Shawn Iverson<div>Director of Technology</div><div>Rush County Schools</div><div>765-932-3901 x271</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_UFV2VFdmNG1SaVE&revid=0Bw5iD0ToYvs_U3VaVlpuTFBtak9QZXVRL3FmRUd2d0laTkZRPQ" width="96" height="39"><br></div></div></div></div></div></div></div>
</div>