Pyzor error using MailScanner

From Thom's wiki
Jump to: navigation, search

When using the command *MailScanner --lint*, I saw the following error message:

 pyzor: check failed: internal error, python traceback seen in response

Fixing it is quite easy.

Create directory for Pyzor:

 sudo mkdir /etc/mail/spamassassin/.pyzor

Set the correct ownership. I use Postfix as my MTA so in my case it is:

 sudo chown -R postfix. /etc/mail/spamassassin/.pyzor

Locate the pyzor executable

 sudo find / -name pyzor

Open the MailScanner config file in /etc/mail/spamassassin

 sudo nano /etc/mail/spamassassin/ 

Locate the pyzor section and make it look like this (Edit the pyzor_path if your pyzor is located else where):

 ifplugin Mail::SpamAssassin::Plugin::Pyzor
   pyzor_path /usr/bin/pyzor
   pyzor_options --homedir /etc/mail/spamassassin/.pyzor

Restart MailScanner

sudo systemctl restart mailscanner

Test it:

 sudo MailScanner --lint