Mudah-mudahan bermanfaat. Kalau ada yang salah, tolng dikoreksi. Trims
=====================

How to install Spamassassin with Sendmail

Introduction
We all hate spam, right? One of my first tasks as a Linux
Administrator was to figure out a way to filter out the spam we
receive on a daily basis. To add to the problem, I had to do do it
accurately AND not just bounce the mail. Oh no, that would be too
easy. We had to make sure, 100% sure the mail was spam. This means
human edited and not just bounced.

On top of that, we use Redhat Linux as a mail gateway, so it had to
filter all incoming mail before it got to our internal server. Fun,
eh?

This HOWTO is geared towards Redhat users, but it should work with any
version of Linux + sendmail since most of it is configuring
Spamassassin anyway. Be warned, however, you will be installing a
milter for Sendmail so if you're not comfortable with this, you may
want to reconsider your choice for anti-spam. Don't worry though, it's
fairly simple even for a noob like me.

So what's this Spamassassin thing anyway?
Spamassassin is a mail filter used to identify spam. If you need to
know about what Spamassassin does and how it does it, I suggest you
check out the Official Spamassassin page for information regarding the
product. It would be stupid for me to get into all of this here, so I
won't. Just know that I spent a considerable amount of time looking
for a solution to our spam problem, and Spamassassin did the best job.
It is VERY effective.

Installing Spamassassin
First, you need to make sure you have the sendmail development tools
installed for your specific version of Sendmail. We are a Redhat shop,
so I simply up2date'd them down to our server. Redhat Network does
have an RPM for spamassassin, but I found they were quite old, so I
had to find some later RPM builds on my own. I ran across this page
which contains virtually everything you need. Hooray for mirrors!

1. Download the Spamassassin source RPM from this site. Make sure that
you are downloading the SOURCE RPM, (for example:
spamassassin-2.55-1.7.3.src.rpm).
2. Grab the latest Spamass-milter SOURCE RPM (again, make sure its the
SOURCE). If this site does not have the RPMs, you might have some luck
locating them here).

Now you need to build the RPMs from the sources. Type:

     rpmbuild --rebuild spamassassin-<rev>.src.rpm

..to build the RPMs. Of course, replace <rev> with the revision of
Spamassassin you are using. Do the same with the milter:

     rpmbuild --rebuild spamass-milter-<rev>.src.rpm

Now, you will need to CD to:

     /usr/src/redhat/RPMS/i386/

If you do a ls, you will see quite a few files here. First, you need
to install the Spamassassin Perl modules:

     rpm -ivh perl-Mail-SpamAssassin-<rev>.rpm

..and then the Spamassassin files..

     rpm -ivh spamassassin-<rev>.rpm

..and now the Spamassassin tools..

     rpm -ivh spamassassin-tools-<rev>.rpm

..and finally the Sendmail milter..

     rpm -ivh spamass-milter-<rev>.rpm

Spamassassin is now installed, and you will need to start the
Spamassassin daemon in daemon mode. Type:

     spamd -d

Once this is done, you have to configure how you want the milter to
handle your mail. Since my boss wants to review the blocked mail, we
have the milter set to send mail to a spam box. Note that we found out
the hard way that this can not be a sendmail alias: it has to be a
real account on the same machine. Here's the command line I use to
start the milter:

     spamass-milter -p /var/run/spamass.sock -f -b [EMAIL PROTECTED]

You're almost done. Now you have to tell Sendmail to pipe the mail
through the Milter/Spamassassin. edit your sendmail.mc file to add the
following line (this is all one line):

INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass.sock,
F=,T=C:15m;S:4m;R:4m;E:10m')

Now you need to recreate your sendmail.cf file (it's always a good
idea to backup the original first):

     m4 sendmail.mc > sendmail.cf

FINALLY, restart sendmail.. and you're done! See, now that wasn't so
hard, now was it. Of course, this is a basic, simple installation..you
may want to check out this configuration tool for writing a global
local.cf file for Spamassassin (it goes in /etc/mail/spamassassin).
Also, If you use the Bayes filtering method, all your Bayes tokens
will be stored in /root/.spamassassin/ ..neat, eh?
 
 

Last Modified: Tuesday, August 19, 2003
[EMAIL PROTECTED]

--
Unsubscribe: kirim email kosong ke [EMAIL PROTECTED]
Arsip, FAQ, dan info milis di http://linux.or.id/milis
Tidak bisa posting? Baca:
http://linux.or.id/problemmilis
http://linux.or.id/tatatertibmilis

Kirim email ke