Mixing Business with Pleasure since 1999

Set up Pyzor with SpamAssassin on Debian

Reading Time: 2 minutes

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.

Pyzor is a completely free database and software HashSharingSystem, written by Frank Tobin.

First steps

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 use_pyzor 1.


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 [10904] dbg: pyzor: network tests on, attempting Pyzor
Oct  6 11:11:52.055 [10904] dbg: pyzor: pyzor is available: /bin/pyzor
Oct  6 11:11:52.056 [10904] dbg: pyzor: opening pipe: /bin/pyzor --homedir /some/dir/.pyzor check < /tmp/.spamassassin10904BmyCb9tmp
Oct  6 11:11:52.344 [10904] dbg: pyzor: [10906] finished: exit 1
<strong>Oct  6 11:11:52.345 [10904] dbg: pyzor: check failed: no response</strong>

Notice the Oct  6 11:11:52.345 [10904] 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 > Servers > 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.


  1. Jeremiah

    I get
    $ pyzor discover
    202018-11-27 22:30:01,379 (19806) CRITICAL Unknown command: discover

  2. Matt

    i get the same ERROR no idea whats wrong…

  3. Martin

    pyzor ping works… so pyzor discover is useless (imho)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2023 Jon Kristian

Theme by Anders NorenUp ↑