<html><head><style id="css_styles" type="text/css"><!--blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
li[style='text-align: center;'], li[style='text-align: right;'] {  list-style-position: inside;}
body { font-family: Tahoma; font-size: 12pt;   }--></style></head><body><div>Hi,</div><div><br /></div><div>When that command runs it does complete and appears to much more than before, it gives me results but it gives me a score of 7.4</div><div><br /></div><div>if i run it without the sudo -u postfix it completes but gives me a score of 9</div><div><br /></div><div>when the email was originally run through MailScanner it got a score of 3(ish)</div><div><br /></div><div>For giggles i gave the postfix membership to all the security groups, and ran it again with your suggested command, and still only gave me a 7.4</div><div><br /></div><div>it was better with  your last command</div><div><br /></div><div><br /></div><div><br /></div><div><br /></div>
<div><br /></div>
<div>------ Original Message ------</div>
<div>From: "Shawn Iverson" <<a href="mailto:iversons@rushville.k12.in.us">iversons@rushville.k12.in.us</a>></div>
<div>To: "MailScanner Discussion" <<a href="mailto:mailscanner@lists.mailscanner.info">mailscanner@lists.mailscanner.info</a>></div>
<div>Sent: 07/06/2018 22:23:21</div>
<div>Subject: Re: Re[2]: Mailscanner - Spamassassin Issue</div><div><br /></div>
<div id="xb6afe13d3e5a4d5"><blockquote cite="CABu_8z+QVCBc02R_3k5osVCArCXe+LZgE9vGRVah=XxF9bCGaA@mail.gmail.com" type="cite" class="cite2">
<div dir="ltr"><div>Toby,</div><div><br /></div>What happens if you run this, which is equivalent to your successful command as root, but as postfix?<div><br /></div><div>sudo -u postfix spamassassin -D -t Testy.eml</div><div><br /></div><div>Which, if it doesn't work, means that your postfix user cannot access things that spamassassin needs to perform a successful scan.<br /><div><br /></div><div><br /><div><div><br /></div><div><br /></div></div></div></div></div><div class="gmail_extra"><br /><div class="gmail_quote">On Thu, Jun 7, 2018 at 3:24 PM, Toby <span dir="ltr"><<a href="mailto:toby@rosecott.net">toby@rosecott.net</a>></span> wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Hi,</div><div><br /></div><div>So after playing with the suggestion below, and changing the command a little bit i now definatley have two different behaviours.</div><div><br /></div><div>Running the commands :-  </div><div>1.    spamassassin -D -t Testy.eml </div><div><br /></div><div>consistantly gives me a full scan and result set and ends (before reporting the score) with :-</div><div><br /></div><div>Jun  7 20:14:41.072 [21537] dbg: check: is spam? score=8.997 required=5<br />Jun  7 20:14:41.072 [21537] dbg: check: tests=BAYES_99,BAYES_999,<wbr>DIGEST_MULTIPLE,HTML_MESSAGE,<wbr>PYZOR_CHECK,RAZOR2_CF_RANGE_<wbr>51_100,RAZOR2_CHECK,RDNS_NONE,<wbr>T_REMOTE_IMAGE<br />Jun  7 20:14:41.073 [21537] dbg: check: subtests=__ANY_TEXT_ATTACH,__<wbr>ANY_TEXT_ATTACH_DOC,__BODY_<wbr>TEXT_LINE,__BODY_TEXT_LINE,__<wbr>BODY_TEXT_LINE,__CAN_HELP,__<wbr>CT,__CTYPE_HAS_BOUNDARY,__<wbr>CTYPE_MULTIPART_ALT,__CTYPE_<wbr>MULTIPART_ANY,__DKIM_<wbr>DEPENDABLE,__DOS_DIRECT_TO_MX,<wbr>__DOS_HAS_ANY_URI,__DOS_RCVD_<wbr>MON,__DOS_SINGLE_EXT_RELAY,__<wbr>HAS_ANY_URI,__HAS_DATE,__HAS_<wbr>FROM,__HAS_MESSAGE_ID,__HAS_<wbr>MSGID,__HAS_RCVD,__HAS_<wbr>SUBJECT,__HAS_TO,__HAS_URI,__<wbr>HTML_LINK_IMAGE,__KHOP_NO_<wbr>FULL_NAME,__LAST_EXTERNAL_<wbr>RELAY_NO_AUTH,__LAST_<wbr>UNTRUSTED_RELAY_NO_AUTH,__<wbr>LOCAL_PP_NONPPURL,__MIME_HTML,<wbr>__MIME_VERSION,__MISSING_REF,_<wbr>_MISSING_REPLY,__MSGID_OK_<wbr>HOST,__NONEMPTY_BODY,__RDNS_<wbr>NONE,__REMOTE_IMAGE,__SANE_<wbr>MSGID,__TAG_EXISTS_BODY,__TAG_<wbr>EXISTS_HEAD,__TAG_EXISTS_HTML,<wbr>__TAG_EXISTS_META,__TOCC_<wbr>EXISTS,__TVD_MIME_ATT_TP<br />Jun  7 20:14:41.075 [21537] dbg: timing: total 46298 ms - init: 5474 (11.8%), parse: 6 (0.0%), extract_message_metadata: 137 (0.3%), get_uri_detail_list: 27 (0.1%), tests_pri_-1000: 130 (0.3%), compile_gen: 713 (1.5%), compile_eval: 138 (0.3%), tests_pri_-950: 22 (0.0%), tests_pri_-900: 24 (0.1%), tests_pri_-400: 36459 (78.7%), check_bayes: 36436 (78.7%), b_tokenize: 29 (0.1%), b_tok_get_all: 11 (0.0%), b_comp_prob: 9 (0.0%), b_tok_touch_all: 0.51 (0.0%), b_finish: 36381 (78.6%), expire_bayes: 36225 (78.2%), tests_pri_0: 3647 (7.9%), check_spf: 161 (0.3%), dkim_load_modules: 106 (0.2%), check_dkim_signature: 2.5 (0.0%), check_dkim_adsp: 126 (0.3%), poll_dns_idle: 0.80 (0.0%), check_razor2: 1416 (3.1%), check_pyzor: 284 (0.6%), tests_pri_500: 331 (0.7%)<br /></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></div><div><br /></div><div>Running the commands</div><div>1.    sudo su postfix -p -c "spamassassin -D -t -C /etc/MailScanner/spamassassin.<wbr>conf < Testy.eml"  - in the dbg statements for this command, there are some warnings about permission</wbr></div><div>2.    sudo -u postfix spamassassin -D -t -C /etc/MailScanner/spamassassin.<wbr>conf Testy.eml</wbr></div><div><div id="m_8109442921777712265x90076e05460b4de387572ace7e2e1c75"><div><div>3.    spamassassin -D -t -C /etc/MailScanner/spamassassin.<wbr>conf Testy.eml </wbr></div></div></div></div><div>Seems to start spamassassin, but it finishes way way sooner than the successful command, it stops very early on in the dbg, and gives a message saying "(no Report template found)</div><div><br /></div><div>the above 3 commands all end up with </div><div>Jun  7 20:23:20.745 [21665] dbg: check: is spam? score=0 required=5<br />Jun  7 20:23:20.746 [21665] dbg: check: tests=<br />Jun  7 20:23:20.746 [21665] dbg: check: subtests=<br />Jun  7 20:23:20.747 [21665] dbg: timing: total 796 ms - init: 696 (87.5%), parse: 6 (0.7%), extract_message_metadata: 62 (7.8%), get_uri_detail_list: 24 (3.0%), tests_pri_0: 21 (2.6%), compile_gen: 4.3 (0.5%)<br /></div><div><br /></div><div>There are plenty of other difference betweent the two reports.</div><div><br /></div><div>Still very little idea of what i am doing with this, so help is still very much appreciated!</div><div><br /></div><div>regards</div><div><br /></div><div>Toby</div><div><br /></div>
<div>------ Original Message ------</div>
<div>From: "Toby Widdows" <<a href="mailto:toby@rosecott.net">toby@rosecott.net</a>></div>
<div>To: "MailScanner Discussion" <<a href="mailto:mailscanner@lists.mailscanner.info">mailscanner@lists.<wbr>mailscanner.info</wbr></a>></div>
<div>Sent: 06/06/2018 23:15:04</div>
<div>Subject: Re: Mailscanner - Spamassassin Issue</div><div><br /></div>
<div id="m_8109442921777712265xc2d664cda90c444"><blockquote cite="http://77D992F1C0846DE7.9BB6FC06-791F-410B-B2ED-C600CC868663@mail.outlook.com" type="cite" class="m_8109442921777712265cite2">


<div id="m_8109442921777712265compose-container" style="direction:ltr">
        <span>
                <span content="Outlook Mobile for iOS"></span>
        </span>   
        <div>
                <div><div style="direction:ltr">Ahh never thought of that, will give it a try</div></div>
                
                <div><br /></div>
                <div class="m_8109442921777712265acompli_signature"><div>Regards </div><div><br /></div><div><br /></div><div>Toby Widdows</div></div>
        </div>
</div><br /><br /><br />
<div class="gmail_quote">On Wed, Jun 6, 2018 at 11:14 PM +0100, "Shawn Iverson" <span dir="ltr"><<a href="mailto:iversons@rushville.k12.in.us">iversons@rushville.k12.in.us</a>></span> wrote:<br />
<br />

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="3D"ltr"">
<div dir="ltr">Toby,<div><br /></div><div>Are you executing spamassassin in the same way that MailScanner calls spamassassin?</div><div><br /></div><div>In other words...assuming MailScanner is running as postfix...something like this....</div><div><br /></div><div>

<span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">sudo su postfix -p -c "</span><span class="m_8109442921777712265gmail-il" style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">spamassassin</span><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span>-t -d -C /etc/MailScanner/</span><span class="m_8109442921777712265gmail-il" style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">spamassassin</span><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">.</span><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><wbr>conf < somespamemail"</wbr></span>

<br /></div><div><br /></div><div>This may shed some insight.</div></div><div class="gmail_extra"><br /><div class="gmail_quote">On Wed, Jun 6, 2018 at 2:47 PM, Toby <span dir="ltr"><<a href="mailto:toby@rosecott.net">toby@rosecott.net</a>></span> wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div><div id="m_8109442921777712265m_-2817707338740834133x8d1c0d3786614ea68947eece87079002"><div><div id="m_8109442921777712265m_-2817707338740834133x89c6ef4f7f214ab"><div id="m_8109442921777712265m_-2817707338740834133x7c1057755bd34d1">Hi,<div><br /></div><div>I have just set up MailScanner in a PI3 running Jessie, I have postfix as a mail server.</div><div><br /></div><div>I'm not sure MailScanner is calling or allowing Spamassassin to run properly.</div><div><br /></div><div>I can see from the X headers that stuff is happening, but it is not catching emails that are blatantly spam.  i get a lot of scores below 3.</div><div><br /></div><div>It passes the eicar, and gtube tests.</div><div><br /></div><div>However i picked an email that passed through mailscanner with a low score of 3, saved it, and then ran spamassassin -D <filename>  and this process marked it as a 9!</div><div><br /></div><div>I think, but am not sure, that MailScanner is not triggering Spamassassin or Spamassassin when triggered by MailScanner is either not completing or not doing anything.</div><div><br /></div><div>I am completely new to this, and have no idea where to look, or what to do.</div><div><br /></div><div>Any help greatly appreciated</div><div><br /></div><div>Regards</div><span class="m_8109442921777712265HOEnZb"><font color="#888888"><div><br /></div><div>Toby</div></font></span></div></div></div></div>
</div><br /><br /><span class="HOEnZb"><font color="#888888">
<br />
-- <br />
MailScanner mailing list<br />
<a href="mailto:mailscanner@lists.mailscanner.info">mailscanner@lists.mailscanner.<wbr>info</wbr></a><br />
<a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" rel="noreferrer">http://lists.mailscanner.info/<wbr>mailman/listinfo/mailscanner</wbr></a><br />
<br />
<br /></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br /><br clear="all" /><div><br /></div>-- <br /><div class="m_8109442921777712265gmail_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">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>
</font></span></div>

</div>

</blockquote>
</div>
</blockquote></div>
</div><br /><br />
<br />
-- <br />
MailScanner mailing list<br />
<a href="mailto:mailscanner@lists.mailscanner.info">mailscanner@lists.mailscanner.<wbr>info</wbr></a><br />
<a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" rel="noreferrer">http://lists.mailscanner.info/<wbr>mailman/listinfo/mailscanner</wbr></a><br />
<br />
<br /></blockquote></div><br /><br clear="all" /><div><br /></div>-- <br /><div 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">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>
</blockquote></div>
</body></html>