Anyone using Pyzor?

Use this forum for discussions about SpamAssassin and anti-spam in general.
Post Reply
User avatar
RvdH
Senior user
Senior user
Posts: 2386
Joined: 2008-06-27 14:42
Location: The Netherlands

Anyone using Pyzor?

Post by RvdH » 2022-09-19 15:17

Anyone who uses SpamAssassin also utilizes Pyzor? Must be pretty good as it still is included as default enabled plugin
Was trying to build it using instructions here, https://cwiki.apache.org/confluence/dis ... usingpyzor but can't really make it work, must be doing something wrong

Anyone has complete build instructions to use Mail::SpamAssassin::Plugin::Pyzor on Windows?
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

palinka
Senior user
Senior user
Posts: 3742
Joined: 2017-09-12 17:57

Re: Anyone using Pyzor?

Post by palinka » 2022-09-19 16:46

RvdH wrote:
2022-09-19 15:17
Anyone who uses SpamAssassin also utilizes Pyzor? Must be pretty good as it still is included as default enabled plugin
Was trying to build it using instructions here, https://cwiki.apache.org/confluence/dis ... usingpyzor but can't really make it work, must be doing something wrong

Anyone has complete build instructions to use Mail::SpamAssassin::Plugin::Pyzor on Windows?
Python version? About the only thing I really know about python is that the code radically changed after ver 2 and many things can't run on both (< v2 >).

I noticed that the instructions seem to reference ver 2 indirectly.

User avatar
RvdH
Senior user
Senior user
Posts: 2386
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: Anyone using Pyzor?

Post by RvdH » 2022-09-19 16:53

I got it working, sort of...no hits this far, so not sure if it is worth it after all
  1. Install Python (I took the latest 2.x version because, as you mentioned all instructions are based on this) https://www.python.org/downloads/release/python-2718/
  2. Download pyzor 1.0.0, https://pypi.org/project/pyzor/
  3. Unpack pyzor in: C:\pyzor-1.0.0
  4. Open Command Prompt
  5. cd C:\pyzor-1.0.0
  6. python setup.py build
  7. python setup.py install
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. I used C:\ProgramData\.pyzor

Code: Select all

mkdir C:\ProgramData\.pyzor
Create a pyzor.bat in your python folder (c:\python27 by default when I installed it), containing the following line, modified for your python folder path.

pyzor.bat

Code: Select all

@c:\python27\python c:/python27/scripts/pyzor --homedir C:\ProgramData\.pyzor %1 %2 %3 %4 %5 %6 %7 %8 %9
Tell spamassassin where Pyzor lives adding this to your local.cf

Code: Select all

use_pyzor 1
pyzor_path c:\python27\pyzor.bat
pyzor_options --homedir C:\ProgramData\.pyzor
pyzor_timeout 10

Not sure if C:\ProgramData\.pyzor has to be created, has to be included in pyzor.bat and local.cf... seems not to be used at all
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
RvdH
Senior user
Senior user
Posts: 2386
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: Anyone using Pyzor?

Post by RvdH » 2022-09-19 17:22

Code: Select all

Return-Path: <mail2@anothersea.co>
X-Spam-Checker-Version: SpamAssassin 4.0.0-rc2-r1903986 (2022-09-10) on WIN-9UGLTTGHFTK
X-Spam-Flag: YES
X-Spam-Level: **************************
X-Spam-Status: Yes, score=26.7 required=4.0 tests=BAYES_99,BAYES_999,
 DKIM_INVALID,DKIM_SIGNED,DMARC_NONE,HTML_MESSAGE,KAM_DMARC_NONE,
 KAM_DMARC_STATUS,KAM_MARKSPAM,KAM_VERY_BLACK_DBL,PYZOR_CHECK,
 RAZOR2_CF_RANGE_51_100,RAZOR2_CHECK,RCVD_IN_AMI_BLACK,RDNS_NONE,
 SPF_HELO_NONE,URIBL_ABUSE_SURBL,URIBL_BLACK,URIBL_DBL_SPAM autolearn=spam
 autolearn_force=no version=4.0.0-rc2-r1903986
X-Spam-ASN: AS205220 RH & Co. IT Services Ltd
X-Spam-Relay-Country: CZ
X-Spam-Report: 
 *  1.2 URIBL_ABUSE_SURBL Contains an URL listed in the ABUSE SURBL
 *      blocklist
 *      [URI: anothersea.co]
 *      [URI: light.printmedias.co]
 *  0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
 *  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
 *      valid
 *  1.4 PYZOR_CHECK Listed in Pyzor
 *      (https://pyzor.readthedocs.io/en/latest/)
 *  0.9 RAZOR2_CHECK Listed in Razor2 (http://razor.sf.net/)
 *  3.0 RCVD_IN_AMI_BLACK RBL: Received via a relay in Abusix Mail
 *      Intelligence Black
 *      [194.87.51.26 listed in combined.mail.abusix.zone]
 *  2.5 URIBL_DBL_SPAM Contains a spam URL listed in the Spamhaus DBL
 *      blocklist
 *      [URI: light.printmedias.co]
 *      [URI: anothersea.co]
 *  1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist
 *      [URI: anothersea.co]
 *  0.2 KAM_DMARC_NONE DKIM has Failed or SPF has failed on the message and
 *      the domain has no DMARC policy
 *  0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid
 *  5.0 KAM_VERY_BLACK_DBL Email that hits both URIBL Black and Spamhaus DBL
 *  0.0 KAM_DMARC_STATUS Test Rule for DKIM or SPF Failure with Strict
 *      Alignment
 *  3.5 BAYES_99 BODY: Bayes spam probability is 99 to 100%
 *      [score: 1.0000]
 *  0.2 BAYES_999 BODY: Bayes spam probability is 99.9 to 100%
 *      [score: 1.0000]
 *  0.0 HTML_MESSAGE BODY: HTML included in message
 *  0.8 RDNS_NONE Delivered to internal network by a host with no rDNS
 *  4.0 KAM_MARKSPAM Email arrived marked as Spam
 *  1.9 RAZOR2_CF_RANGE_51_100 Razor2 gives confidence level above 50%
 *      [cf: 100]
 *  0.1 DMARC_NONE DMARC none policy
Received: from mail.anothersea.co (Unknown [194.87.51.26]) by mail.myserver.nl
 with ESMTPS (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256) ;
 Mon, 19 Sep 2022 17:19:52 +0200
FYI, testing SpamAssassin 4.0.0-rc2, even had some Windows specific bugs fixed, thru https://bz.apache.org/SpamAssassin/ :)
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

Post Reply