Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: [Original edit by BretMiller]

Using Pyzor

Pyzor is a completely free database and software HashSharingSystem, written by Frank Tobin. http://pyzor.sourceforge.net/ .

Pyzor Install Hints

  • Be sure to run "pyzor discover" after you install Pyzor, so that you can download the server to contact.

Using Pyzor Site-wide

  • Note permissions advice concerning /etc/mail/spamassassin in RazorSiteWide and add the following to your /etc/mail/spamassassin/local.cf: pyzor_options --homedir /etc/mail/spamassassin
    • Now put some servers in that dir: pyzor --homedir /etc/mail/spamassassin discover
    • And finally, restart spamd: /etc/init.d/spamd restart
    • Make sure that when you call spamassassin -r that you do it like this: spamassassin -x -C /etc/mail/spamassassin -r That will ensure that spamassassin uses the /etc/mail/spamassassin/local.cf config and not try to create user_prefs all over the place. Some users have reported that -C /path/to/sa breaks black/whitelist_from.

Is it working?

You can run SpamAssassin from the command line to figure out if it is using Pyzor. The process is described at RazorHowToTell, but the summary is to run the following from the command line:

No Format
  spamassassin -D --lint

Pyzor on Debian

  • If you are using Debian, there are (currently) packages for testing and unstable available from the main tree:

http://packages.debian.org/cgi-bin/search_packages.pl?keywords=pyzor&searchon=names&subword=1&version=all&release=all

  • There are also backports to woody available from various sources. One (that works for me) is:

http://www.gothgoose.net/debian/

Detailed instructions

Very detailed instructions on configuring pyzor for a personal Unix account are in SingleUserUnixInstall.

Reporting

Using SpamAssassin to submit spam is described in ReportingSpam.

Pyzor on Windows

It is possible to make Pyzor work on Windows with a little extra effort.

  • Download and install ActivePython from www.activestate.com.
  • Download and install Pyzor from http://pyzor.sourceforge.net/. You'll need something that can un-bzip2 the files. Installing simply means running the following from the folder you extracted pyzor into:
    No Format
    python setup.py build
    python setup.py install
    
  • Create a pyzor.bat in your python folder (c:\python24 by default when I installed it), containing the following line, modified for your python folder path.
    No Format
    @c:\python24\python scripts/pyzor %1 %2 %3 %4 %5 %6 %7 %8 %9 
    
  • Edit /Lib/site-packages/pyzor/client.py with the following changes:
    • Find signal.signal(signal.SIGALRM, handle_timeout) and put a # in front of it.
    • Find the section for: def time_call(self, call, varargs=(), kwargs=None): and change it to read like this:
      No Format
          def time_call(self, call, varargs=(), kwargs=None):
              if kwargs is None:  kwargs  = {}
              return apply(call, varargs, kwargs)
      
  • Create a folder somewhere for the pyzor config files. You can use your spamassassin folder if you like as it only creates a single file called servers. This must be on the same drive as your python installation.
  • From a command prompt in the python folder context, run the following where /python/pyzor is the folder you created in the previous step.
    No Format
    pyzor --homedir /python/pyzor discover
    
  • Now you are ready to configure SpamAssassin to use it.
  • Edit your /site/lib/mail/spamassassin/Util.pm. Find the "sub helper_app_pipe_open_windows" section and the line that reads
    No Format
    if ($stdinfile) { $cmd .= " <'$stdinfile'"; }"
    
    and replace it with
    No Format
    if ($stdinfile) { $cmd .= " <\"$stdinfile\""; }"
    
    because Windows won't pipe a file with single quotes around it.
  • Edit v310.pre and uncomment the load for the Pyzor plugin.
  • Edit your local.cf and add configuration lines for pyzor. For example:
    No Format
    use_pyzor   1
    pyzor_path c:\python24\pyzor.bat
    pyzor_options --homedir /python24/pyzor
    
  • That should do it. If you do a spamassassin --lint -D you should see pyzor