Install Pyzor: Difference between revisions

From QmailToaster
Jump to navigation Jump to search
(Created page with "===Install Pyzor=== Jake Vickers <jake@v2gnu.com> September 19, 2006 Scott Hughes - Updated - June 9, 2009 <blockquote>"Pyzor is a collaborative, networked system to detect and block spam using identifying digests of messages."<br /> (from the Pyzor website: http://pyzor.sourceforge.net/)</blockquote> Installing Pyzor is rather easy. You need to have python installed first. Here are the steps to install from source: Download pyzor from Sourceforge (http://s...")
 
No edit summary
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
===Install Pyzor===
[[User_Tips_%26_Tricks#Anti_Spam|Back]]<br>


Jake Vickers <jake@v2gnu.com> September 19, 2006
[[https://www.pyzor.org/en/latest/installation.html#downloading Documentation]]:
Scott Hughes - Updated - June 9, 2009
# dnf install -y pyzor
# pyzor --homedir /etc/mail/spamassassin/pyzor discover
# pyzor --homedir /etc/mail/spamassassin/pyzor discover
Make the servers file readable by all
# cd /etc/mail spamassassin/pyzor
# chmod a+r servers
Run a check -
# echo "test" | spamassassin -D pyzor 2>&1 | less
You should see some output like this<br>
Feb  9 16:24:58.824 [23979] dbg: pyzor: network tests on, attempting Pyzor
Feb  9 16:24:59.787 [23979] dbg: pyzor: pyzor is available: /usr/bin/pyzor
Feb  9 16:24:59.788 [23979] dbg: pyzor: opening pipe: /usr/bin/pyzor check < /tmp/.spamassassin23979z26KDDtmp
Feb  9 16:24:59.841 [23979] dbg: pyzor: [23981] finished: exit 1
Feb  9 16:24:59.842 [23979] dbg: pyzor: check failed: no response<br>
Add the following lines to the end of /etc/spamassassin/local.cf
pyzor_options --homedir /etc/mail/spamassassin/pyzor<br>
# systemctl restart spamassassin


<blockquote>&quot;Pyzor is a collaborative, networked system to detect and block spam using identifying digests of messages.&quot;<br /> (from the Pyzor website: http://pyzor.sourceforge.net/)</blockquote>
[[https://www.binarytides.com/install-spamassassin-with-postfix-dovecot/ Razor]]


Installing Pyzor is rather easy. You need to have python installed first. Here are the steps to install from source:
<!--
 
Make sure that pyzor is enabled in your /etc/mail/spamassassin/v310.pre file:
Download pyzor from Sourceforge (http://sourceforge.net/projects/pyzor/files/pyzor/0.5.0/pyzor-0.5.0.tar.bz2/download).
 
<pre>wget http://kent.dl.sourceforge.net/sourceforge/pyzor/pyzor-0.5.0.tar.bz2</pre>
 
Unpack the package:
<pre>tar xjvf pyzor-0.5.0.tar.bz2</pre>
 
Move into the dir:
<pre>cd pyzor-0.5.0</pre>
 
Download patches from http://antispam.imp.ch/08-opensource.html?lng=0:
<pre>
wget http://antispam.imp.ch/patches/patch-pyzor-debian-mbox
patch -p0 -b -Vt < patch-pyzor-debian-mbox
wget http://antispam.imp.ch/patches/patch-pyzor-handle_unknown_encodings
patch -p0 -b -Vt < patch-pyzor-handle_unknown_encodings
wget http://antispam.imp.ch/patches/patch-pyzor-unknowntype
patch -p0 -b -Vt < patch-pyzor-unknowntype
</pre>
 
Run the setup process:
<pre>python setup.py build
python setup.py install
pyzor discover</pre>
 
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:
 
<pre>17 2 * * * pyzor discover</pre>
 
Make sure that pyzor is enabled in your /etc/mail/spamassassin/v310.pre file:


<pre># Pyzor - perform Pyzor message checks.
<pre># Pyzor - perform Pyzor message checks.
Line 66: Line 52:
|-
|-
|}
|}
 
-->
== [[User Tips & Tricks]] ==
== [[User Tips & Tricks]] ==

Latest revision as of 18:37, 16 April 2024

Back

[Documentation]:

# dnf install -y pyzor
# pyzor --homedir /etc/mail/spamassassin/pyzor discover
# pyzor --homedir /etc/mail/spamassassin/pyzor discover
Make the servers file readable by all
# cd /etc/mail spamassassin/pyzor
# chmod a+r servers
Run a check -
# echo "test" | spamassassin -D pyzor 2>&1 | less
You should see some output like this
Feb 9 16:24:58.824 [23979] dbg: pyzor: network tests on, attempting Pyzor Feb 9 16:24:59.787 [23979] dbg: pyzor: pyzor is available: /usr/bin/pyzor Feb 9 16:24:59.788 [23979] dbg: pyzor: opening pipe: /usr/bin/pyzor check < /tmp/.spamassassin23979z26KDDtmp Feb 9 16:24:59.841 [23979] dbg: pyzor: [23981] finished: exit 1 Feb 9 16:24:59.842 [23979] dbg: pyzor: check failed: no response
Add the following lines to the end of /etc/spamassassin/local.cf pyzor_options --homedir /etc/mail/spamassassin/pyzor
# systemctl restart spamassassin
[Razor]

User Tips & Tricks