Page 2 of 2

Re: SA Learn error

Posted: 18 Oct 2020 21:47
by shawniverson

Re: SA Learn error

Posted: 23 Oct 2020 20:11
by Pukkeltje
@hunter-nl: This solution works!

Re: SA Learn error

Posted: 23 Oct 2020 20:15
by Pukkeltje
hunter-nl wrote: 15 Oct 2020 15:53 I had the same issue. I've fixed it with the following steps:

1. Into the file /var/spool/postfix/.razor/razor-agent.conf add the line

Code: Select all

razorhome = /var/spool/postfix/.razor
2. Into the file /etc/MailScanner/spamassassin.conf add the following section

Code: Select all

ifplugin Mail::SpamAssassin::Plugin::Razor2
razor_config  /var/spool/postfix/.razor/razor-agent.conf
#razorhome     = /var/spool/postfix/.razor
endif
And restart spamassassin service

Code: Select all

systemctl restart spamassassin
3. Run the command:

Code: Select all

su -c "/bin/cat /usr/share/doc/spamassassin/sample-spam.txt | razor-report -d --verbose" -s /bin/bash postfix
4. If /var/spool/postfix/.razor/razor-agent.log doesn't exist yet, create empty file

Code: Select all

touch /var/spool/postfix/.razor/razor-agent.log
5. Change permissions

Code: Select all

chown -R postfix:mtagroup /var/spool/postfix/.razor
chmod 640 /var/spool/postfix/.razor/{identity-*,razor-agent.conf}
chmod 664 /var/spool/postfix/.razor/razor-agent.log
chmod 644 /var/spool/postfix/.razor/server*
chmod ug+s /var/spool/postfix/.razor
Now it should work.
This works!