spamassassin 3.0 RedHat Linux Installation Guide

by William Stearns <wstearns@pobox.com> and Marion Bates <mbates@whoopis.com>

This has been tested successfully on RH 9. YMMV.

  1. Get packages. Go to ftp.kluge.net and get
    /pub/spamassassin/RPMS/spamassassin-3.0.0-0.rc5.src.rpm (or whatever's newest, by date)
    
    and
    /pub/felicity/RPMS/perl-Net-DNS-0.46-1.src.rpm
    
  2. Resolve dependencies. Use redcarpet for whichever ones you can. rc/rug install X where X includes but is not necessarily limited to the following:
    perl-Digest-SHA1
    perl-DateManip
    perl-URI
    perl-libwww-perl
    perl-Digest-HMAC
    
  3. Build things.
    rpmbuild --rebuild perl-Net-DNS-0.46-1.src.rpm
    rpmbuild --rebuild spamassassin-3.0.0-0.rc5.src.rpm
    
    This is where you will probably get some "failed dependencies" errors. That brings us to step...

  4. Install CPAN. First get some things CPAN will need, if you don't have them already. Use redcarpet or equivalent if possible:
    perl-CPAN
    elinks
    ncftp
    
    Initialize CPAN:
    perl -MCPAN -e shell;
    
    Follow prompts. When it finishes configuring itself, you will be at the cpan> prompt. Exit.

  5. Get things with CPAN.
    cpan -i bundlename
    
    where bundlename is each of these:
    Digest::MD5
    Parse::Syslog
    Statistics::Distributions
    
    It will undoubtedly discover dependencies for these, and ask if you want to install them. Say yes. It will also probably ask if you want to update CPAN itself -- not a bad idea.

  6. Try rebuilding the spamassassin source RPMs. If there are still dependency problems, try to solve them with (in order of preference) redcarpet, cpan, or src rpms from kluge.net.

    When they finally build, install them:

    cd /usr/src/redhat/RPMS/i386
    rpm -Uvh perl-Mail-SpamAssassin-3.0.0-0.rc5.i386.rpm spamassassin-3.0.0-0.rc5.i386.rpm spamassassin-tools-3.0.0-0.rc5.i386.rpm
    
    More dependencies? You'll have to imagine my utter surprise. Rinse, lather, and repeat with redcarpet/cpan/kluge.net until it installs. If you exhaust all of those possibilities and it still whines, run the command with the "nodeps" option, like so:
    rpm -Uvh --nodeps perl-Mail-SpamAssassin-3.0.0-0.rc5.i386.rpm spamassassin-3.0.0-0.rc5.i386.rpm spamassassin-tools-3.0.0-0.rc5.i386.rpm
    
    This will force it to install regardless of what it thinks about dependencies.

  7. Test. Try starting up spamassassin. Also test output to make sure the perl-Net-DNS part of things is working:
    spamassassin --lint -D 2>&1 | grep -i dns
    
    In the output, among other things, you should see
    debug: is Net::DNS::Resolver available? yes
    debug: Net::DNS version: 0.46
    debug: NS lookup of sourceforge.net succeeded => Dns available (set dns_available to hardcode)
    debug: is DNS available? 1
    
    If instead you get messages indicating a problem with DNS, reinstall perl-Net-DNS or upgrade the version.

    If all is well, proceed with configuration details on http://www.whoopis.com/howtos/kill-spam.html and/or http://www.stearns.org/doc/spamassassin-setup.current.html.