Install Pyzor: Difference between revisions

From QmailToaster
Jump to navigation Jump to search
No edit summary
No edit summary
Line 20: Line 20:
<pre>pyzor-0.7.0</pre>
<pre>pyzor-0.7.0</pre>


Run the setup process:
<pre>python setup.py build
python setup.py install</pre>
<span style="color:green">
<span style="color:green">
Pyzor requires at least Python 2.6
Pyzor requires at least Python 2.6


To install this distribution, simply run the following:
To install this distribution, simply run the following:
         python setup.py build
         python setup.py build
         python setup.py install
         python setup.py install


Note that your system might install the modules and scripts
Note that your system might install the modules and scripts
with non-world-readable permissions.
with non-world-readable permissions.
Correct this with a command such as:
Correct this with a command such as:


         chmod -R a+rX /usr/share/doc/pyzor \
         chmod -R a+rX /usr/share/doc/pyzor \
Line 38: Line 35:
                 /usr/bin/pyzor /usr/bin/pyzord
                 /usr/bin/pyzor /usr/bin/pyzord


To use the server, the Python gdbm module or MySQLdb module is required.
To use the server, the Python gdbm module or MySQLdb module is required.
You can generally check if you have the gdbm module by executing:
You can generally check if you have the gdbm module by executing:
         python -c 'import gdbm' && echo 'gdbm found'
         python -c 'import gdbm' && echo 'gdbm found'
You can generally check if you have the MySQLdb module by executing:
You can generally check if you have the MySQLdb module by executing:
         python -c 'import MySQLdb' && echo 'MySQLdb found'
         python -c 'import MySQLdb' && echo 'MySQLdb found'


The gdbm module is available at:
The gdbm module is available at:
         Debian GNU/Linux:
         Debian GNU/Linux:
                 http://packages.debian.org/stable/interpreters/python-gdbm.html
                 http://packages.debian.org/stable/interpreters/python-gdbm.html
Line 61: Line 58:
                 in their ports).
                 in their ports).


Pyzor also works with Python3.3. The code will be automatically refactored with
Pyzor also works with Python3.3. The code will be automatically refactored with
2to3 during the setup:
2to3 during the setup:
         python3.3 setup.py install
         python3.3 setup.py install


Note that the MySQLdb library does not currently support Python3.
Note that the MySQLdb library does not currently support Python3.


See docs/usage.html for usage documentation, and if you are upgrading
See docs/usage.html for usage documentation, and if you are upgrading
from another version of Pyzor, please read the UPGRADING file.
from another version of Pyzor, please read the UPGRADING file.
</span>
</span>



Revision as of 19:50, 14 April 2024

Back

Install Pyzor

Jake Vickers <jake@v2gnu.com> September 19, 2006 Scott Hughes - Updated - June 9, 2009

"Pyzor is a collaborative, networked system to detect and block spam using identifying digests of messages."
(from the Pyzor website: http://pyzor.sourceforge.net/)

Installing Pyzor is rather easy. You need to have python installed first. Here are the steps to install from source:

Download pyzor from Sourceforge (https://sourceforge.net/projects/pyzor/files/latest/download).

wget wget https://sourceforge.net/projects/pyzor/files/latest/download

Unpack the package:

tar xf download

Move into the dir:

pyzor-0.7.0

Pyzor requires at least Python 2.6
To install this distribution, simply run the following:
       python setup.py build
       python setup.py install
Note that your system might install the modules and scripts
with non-world-readable permissions.
Correct this with a command such as:
       chmod -R a+rX /usr/share/doc/pyzor \
               /usr/lib/python2.2/site-packages/pyzor \
               /usr/bin/pyzor /usr/bin/pyzord
To use the server, the Python gdbm module or MySQLdb module is required.
You can generally check if you have the gdbm module by executing:
       python -c 'import gdbm' && echo 'gdbm found'
You can generally check if you have the MySQLdb module by executing:
       python -c 'import MySQLdb' && echo 'MySQLdb found'
The gdbm module is available at:
       Debian GNU/Linux:
               http://packages.debian.org/stable/interpreters/python-gdbm.html
       Gentoo Linux:
               Will be built with Python if the gdbm library is found.
               If it isn't there with your Python, try stealing
               the FreeBSD setup.py patchfile in their ports to
               install just the gdbm module, or simply re-install
               Python.
       FreeBSD:
               ports/databases/py-gdbm
       tar.gz:
               included in the Python distribution
               (not sure of the precise procedure for simply installing
               the gdbm module; try stealing the FreeBSD setup.py patchfile
               in their ports).
Pyzor also works with Python3.3. The code will be automatically refactored with
2to3 during the setup:
       python3.3 setup.py install
Note that the MySQLdb library does not currently support Python3.
See docs/usage.html for usage documentation, and if you are upgrading
from another version of Pyzor, please read the UPGRADING file.

The 'pyzor discover' command tells pyzor to contact home and find the latest list of servers to use. I add this to a cron to be run nightly:

17 2 * * * pyzor discover

Make sure that pyzor is enabled in your /etc/mail/spamassassin/v310.pre file:

# Pyzor - perform Pyzor message checks.
#
loadplugin Mail::SpamAssassin::Plugin::Pyzor

And then make sure that spamassassin is going to use Pyzor as a check:

echo "use_pyzor 1" >> /etc/mail/spamassassin/local.cf

Now check to make sure it shows. Note: You will frequently show a timeout on Pyzor. This is normal - the server is very busy.

spamassassin -D --lint

And that's it.

Some more tips for Pyzor:

The default server will timeout 50% of the time. Google to find another server to use - most do NOT allow high volume servers to check against theirs. If you find some that DO allow this, please post them here for the rest of us!

Known good Pyzor servers:
IP:Port Last Verified Where Found
82.94.255.100:24441 11/20/2006 http://www.nabble.com/Pyzor-issue-since-upgrade-to-3.1.3-t1742083.html
<new ip:port> <new date> <new URL>

User Tips & Tricks