SPAMASSASSIN SPEEDUP

A great program for stopping spam
SpamAssassin is a great program for stopping almost all spam.

It is written in Perl, and thus runs on pretty much any Unix platform. On my OpenBSD systems, it appears to consume about 11MB of RAM.

The defaults are quite good, but it can be a little slow. Here are ways to speed it up:

USE SPAMD AND SPAMC

Whenever you have to start up a Perl program, the Perl interpreter needs to go through a series of steps before it can start to actually run the program. Under normal usage, a copy of SA is started each time a single email is received.

If different users on the machine receive mail, a spamassassin process will be started for each user, using up RAM.

Since the typical mail user receives many spam messages a day, it makes sense to start the program once, then have it stick around, analyzing emails messages as they appear. This is what spamd does.

The spamd program runs one copy of SA as a server, and uses a small helper program called spamc as a client. The spamc program reads the email to be delivered, sends it to spamd for analysis, then passes it on to procmail or some other program for local delivery to your mailbox.

To start SA as a daemon, run spamd -d as the root user.

STOP ANALYSIS WHEN THRESHOLD REACHED

You can configure SA to determine how many points an email should get before it is considered spam(the default is 5.0 points). Since any message with 5.0 or greater points is considered spam, you can save a few CPU cycles by telling SA to stop analyzing the message once the threshold is reached.

To turn this on, use the flag -S when starting SA.