Mailscanner - Spamassassin Issue

David Jones djones at ena.com
Fri Jun 8 21:32:48 UTC 2018


On 06/08/2018 03:25 PM, Toby wrote:
> Apologies, all public now
> 
> ------ Original Message ------
> From: "David Jones via MailScanner" <mailscanner at lists.mailscanner.info>
> To: mailscanner at lists.mailscanner.info
> Cc: "David Jones" <djones at ena.com>
> Sent: 08/06/2018 20:45:20
> Subject: Re: Mailscanner - Spamassassin Issue
> 
>> On 06/08/2018 02:21 PM, Toby wrote:
>>> Hi,
>>>
>>> Thanks for the replies, and the efforts so far.
>>>
>>> I checked the MailScanner.Conf, and it using postfix as the user and 
>>> group.
>>>
>>> i have created several pastebins:-
>>>
>>> 1: https://pastebin.com/07HcxD72 - Mailscanner --Version
>>>
>>> 2: https://pastebin.com/eh3XmfWb - MailScanner --lint
>>>
>>> 3: https://pastebin.com/J6d8GBB4 - MailScanner.conf
>>>
>>> 4: https://pastebin.com/XAjrPftG - Spamassassin.conf
>>>
>>> 5: https://pastebin.com/BmTnp5SL - Best scan results acheived with 
>>> "sudo -u root -p -c spamassassin -D -t Testy.eml" - Score 9
>>>
>>> 6: https://pastebin.com/dLi6QKjU - Successfull scan as described 
>>> previously  "sudo -u postfix -p -c spamassassin -D -t Testy.eml" - 
>>> score 7.4
>>>
>>> 7: https://pastebin.com/yhwrbb2G - Failed results as previously 
>>> described "sudo -u postfix -p -c spamassassin -D -t -C 
>>> /etc/MailScanner/spamassassin.conf Testy.eml" - score 0
>>>
>>> 8: https://pastebin.com/PtC30M5U - Defaults file from MailScanner
>>>
>>>
>>> Hope this is enough to go forwards.  As you can see i get different 
>>> results for the same user, depending on whether i declare the 
>>> mailscanner/spamassassin.conf file
>>>

If you search for "user_prefs" in those 2 "spamassassin -D" runs you 
will see that it's using 2 different preferences file.  That is the 
difference.  Near the bottom of those runs you see that one is hitting 
BAYES_* while the lower score is not.  That's the difference in the good 
scores.

I would recommend removing the 
/var/spool/postfix/.spamassassin/user_prefs file and maybe even the 
entire .spamassassin dir to avoid any confusion.  The MailScanner 
service script should be starting as user root to read all of it's 
configs then lowering it's privs by switching to the postfix user.

In the bad run, something is trying to open 
/etc/mail/spamassassin/MailScanner.cf.  Does that exist with an 
uppercase "M"?  It's supposed to be "mailscanner.cf" in 
/etc/mail/spamassassin all lowercase.

You need to track down what is pointing to the MailScanner.cf with a 
"grep -rl MailScanner.cf *" from / or something.

These are two very different files but I think something is crossed up 
in your configs:
/etc/mail/spamassassin/mailscanner.cf
/etc/MailScanner/MailScanner.conf

-- 
David Jones


More information about the MailScanner mailing list