5

I have installed and configured razor2 according to official doc including editing the v310.pre config file in spamassassin folder.

I ran both of the following commands with success (both indicated razor was present and running correctly):

 #   spamassassin -t -D < message.txt

 #   razor-check -d message.txt

However, I don't see any indication of razor in the headers of new email coming in.

Example:

Date: Wed, 19 Jun 2013 11:31:19 -0700
Content-Language: en-us
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative;
        boundary="----=Part.164.7502.1371666679"
X-Spam-Status: No, score=6.0
X-Spam-Score: 60
X-Spam-Bar: ++++++
X-Ham-Report: Spam detection software, running on the system "svr1.domain.net", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 root\@localhost for details.

 Content preview:  Book an Alaskan Cruise today Browse Affordable Alaskan Cruises
    Today: http://www.oursearchnews.com/10BVFYT143BJQQR13AMQ12L17HSGW17XXO12NGMTPR1427701KU2917665020.php
    [...]

 Content analysis details:   (6.0 points, 7.0 required)

  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  1.4 RCVD_IN_BRBL_LASTEXT   RBL: RCVD_IN_BRBL_LASTEXT
                             [173.232.8.252 listed in bb.barracudacentral.org]
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was blocked.
                             See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: oursearchnews.com]
  1.7 URIBL_DBL_SPAM         Contains an URL listed in the DBL blocklist
                             [URIs: oursearchnews.com]
  1.2 URIBL_JP_SURBL         Contains an URL listed in the JP SURBL blocklist
                             [URIs: oursearchnews.com]
  0.0 SPF_FAIL               SPF: sender does not match SPF record (fail)
 [SPF failed: Please see http://www.openspf.net/Why?s=mfrom;id=cruisetoalaska%40oursearchnews.com;ip=173.232.8.252;r=svr1.domain.net]
  0.0 HTML_MESSAGE           BODY: HTML included in message
  0.8 MPART_ALT_DIFF         BODY: HTML and text parts are different
 -0.0 BAYES_20               BODY: Bayes spam probability is 5 to 20%
                             [score: 0.1946]
  0.8 RDNS_NONE              Delivered to internal network by a host with no rDNS
  0.0 T_REMOTE_IMAGE         Message contains an external image
X-Spam-Flag: NO

My question is should I be seeing something like 4.0 RAZOR_SCORE?

and also, are there any special steps i need to take on the following setup:

CentOS CPanel /WHM EXIM w/ spamassassin and Dovecot

Thank you and I will be happy to provide more information if needed.

chuckieDub
  • 191
  • 1
  • 2
  • 7

1 Answers1

3

You need two things for Razor support. You must enable it in Spamassassin. In a standard system, /etc/mail/spamassassin/v310.pre. Make sure that this line is uncommented:

loadplugin Mail::SpamAssassin::Plugin::Razor2

Second, make sure that you have the module installed. The quick way to check is to use perl directly. I also included a sample of a module that I knew did not exist. If you see that error when you try to use Razor2, then you need to install the Razor agent from the RepoForge repo:

# perl -e 'use Mail::SpamAssassin::Plugin::Razor2'
# perl -e 'use Mail::SpamAssassin::Plugin::Razor3'
Can't locate Mail/SpamAssassin/Plugin/Razor3.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

# rpm -qa | grep Razor
perl-Razor-Agent-2.85-1.el5.rf

Finally verify that spamassassin is actually using this module when it loads:

# spamassassin -D < riz.cf 2>&1 | grep Razor
Jun 26 18:13:42.521 [303] dbg: plugin: loading Mail::SpamAssassin::Plugin::Razor2 from @INC
Todd Lyons
  • 2,036
  • 16
  • 13