Not many, but a few clients were reporting that they’ve been receiving a lot of spam on their account, so I decided to take a closer look on pyzor and how to integrate it with spamassassin under virtualmin on debian.
If you have a firewall running (I hope you do), you need to open tcp/udp 24441. Pyzor uses both udp and tcp, it looks as though the client communicates with the server via udp but the server answers back with a tcp connection.
First off begin with installing pyzor
sudo apt-get install pyzor. Then you should run
pyzor discover to get a reference to the server which should be used. Afterwards you can also run
pyzor ping which should yield an “OK” response.
Next up, if you’re using virtualmin you should be good to go, if not you should edit
/etc/spamassassin/local.cf and add
To make sure spamassassin is using pyzor just stop the spamassassin daemon and run this command
echo "test" | spamassassin -D pyzor 2>&1 | less.
It should output something similar to this:
Oct 6 11:11:46.956  dbg: pyzor: network tests on, attempting Pyzor
Oct 6 11:11:52.055  dbg: pyzor: pyzor is available: /bin/pyzor
Oct 6 11:11:52.056  dbg: pyzor: opening pipe: /bin/pyzor --homedir /some/dir/.pyzor check < /tmp/.spamassassin10904BmyCb9tmp Oct 6 11:11:52.344  dbg: pyzor:  finished: exit 1 Oct 6 11:11:52.345  dbg: pyzor: check failed: no response
Oct 6 11:11:52.345  dbg: pyzor: check failed: no response? it’s just telling you that the e-mail was not properly formatted, if you want to you could test with a properly formatted e-mail but so far everything should be working.
If you’re using Virtualmin, there are some specific pyzor configurations under
Webmin -> SpamAssassin Mail Filter -> Miscellaneous User Options.
I’ve barely scratched the surface here and will update this guide if I come across any new information.