• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question spamassassin with razor and pyzor

moswak

Regular Pleskian
could someone please check if this manual for centos 6/7 is correct?

Code:
yum install perl-Razor-Agent pyzor

Code:
pyzor --homedir /etc/mail/spamassassin discover
mkdir /etc/mail/spamassassin/.razor
sudo razor-admin -home=/etc/mail/spamassassin/.razor -register
sudo razor-admin -home=/etc/mail/spamassassin/.razor -create
sudo razor-admin -home=/etc/mail/spamassassin/.razor -discover

Code:
nano /etc/mail/spamassassin/99_pyzor_razor.cf
    use_pyzor 1
    pyzor_options --homedir /etc/mail/spamassassin
    pyzor_path /usr/bin/pyzor
    use_razor2 1
    razor_config /etc/mail/spamassassin/.razor/razor-agent.conf

Code:
systemctl restart spamassassin.service
 
Ok, seem there is some step that have been forgotten :


yum install perl-Razor-Agent pyzor
pyzor --homedir /etc/mail/spamassassin discover
mkdir /etc/mail/spamassassin/.razor
razor-admin -home=/etc/mail/spamassassin/.razor -register
razor-admin -home=/etc/mail/spamassassin/.razor -create
razor-admin -home=/etc/mail/spamassassin/.razor -discover
cd /etc/mail/spamassassin/
wget "http://sourceforge.net/projects/ixhash/files/latest/download?source=files" -O iXHash.zip
unzip iXHash.zip
mv iXhash-1.5.5/ .iXHash
rm iXHash.zip
mkdir /var/spool/spamassassin
chown popuser /var/spool/spamassassin


nano /etc/mail/spamassassin/99_pyzor_razor.cf

Code:
# Pyzor
loadplugin Mail::SpamAssassin::Plugin::Pyzor
pyzor_options --homedir /etc/mail/spamassassin/.pyzor
use_pyzor 1
add_header all Pyzor _PYZOR_
pyzor_path /usr/bin/pyzor

# Razor
loadplugin Mail::SpamAssassin::Plugin::Razor2
use_razor2 1
razor_config /etc/mail/spamassassin/.razor/razor-agent.conf
score   RAZOR2_CHECK 1.5

# iXHash
loadplugin Mail::SpamAssassin::Plugin::iXhash  /etc/mail/spamassassin/.iXHash/iXhash/iXhash.pm
ixhash_timeout          10
use_ixhash_cache        1
ixhash_pureperl         1
body            GENERIC_IXHASH eval:ixhashtest('generic.ixhash.net')
describe        GENERIC_IXHASH iXhash found @ generic.ixhash.net
tflags          GENERIC_IXHASH net
score           GENERIC_IXHASH 3.0
body            NIXSPAM_IXHASH eval:ixhashtest('ix.dnsbl.manitu.net')
describe        NIXSPAM_IXHASH iXhash found @ ix.dnsbl.manitu.net
tflags          NIXSPAM_IXHASH net
score           NIXSPAM_IXHASH 3.0
body            CTYME_IXHASH eval:ixhashtest('ctyme.ixhash.net')
describe        CTYME_IXHASH BiXhash found @ ctyme.ixhash.ne
tflags          CTYME_IXHASH net
score           CTYME_IXHASH 3.0
body            HOSTEUROPE_IXHASH eval:ixhashtest('hosteurope.ixhash.net')
describe        HOSTEUROPE_IXHASH iXhash found @ hosteurope.ixhash.ne
tflags          HOSTEUROPE_IXHASH net
score           HOSTEUROPE_IXHASH 3.0

# Set some scores
score           RCVD_IN_PBL 1.5
score           BAYES_99 5.5
score           BAYES_50 2.5
score           RDNS_NONE 1.0
score           RAZOR2_CF_RANGE_51_100 2.5
score           RAZOR2_CF_RANGE_E8_51_100 2.5
score           RAZOR2_CHECK 2.5
score           DIGEST_MULTIPLE 2.0
score           FORGED_OUTLOOK_TAGS 1.0
score           FORGED_OUTLOOK_HTML 1.0
score           URIBL_AB_SURBL 2.5
score           URIBL_WS_SURBL 2.5
score           URIBL_SC_SURBL 1.0
score           HTML_IMAGE_RATIO_06 1.0
score           FH_DATE_PAST_20XX 0.0


# Setup global bayes
use_bayes 1
use_bayes_rules 1
bayes_auto_learn 1
bayes_path /var/spool/spamassassin/bayes
bayes_file_mode 077


systemctl restart spamassassin.service

Then, you can check it by

echo "messagetext" | spamassassin

The problem is that, only seem work if the global antispam server is enable, not the individual mailbox filter....
 
Last edited:
we implemented this without iXHash Plugin on some servers and the detection rate has improved.
 
What do you mean exactly ?
The server-wide spam filter is always activated. The settings for a single email address only refer to the number of points and white / blacklist.

these instructions are only available in german, but are said to have led to improvements in many of them.
 
I'm not sure if that makes a difference.
here it would be good if someone from plesk said about it.
as you can see, this issue has not been considered by anyone since 11.2019.
 
Please submit Report with expectation "Help with sorting out" and I'll forward it to developers.
 
Any update on this one?
Should I see the Pyzor header in messages or just use the Spamassassin rule?
 
Back
Top