O'Reilly logo

SpamAssassin by Alistair McDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Verifying the Installation

SpamAssassin can be tested by processing the sample emails. These emails are in the root of the SpamAssassin distribution directory. To test SpamAssassin, use the following commands:

$ spamassassin -t < sample-nonspam.txt | grep X-Spam
X-Spam-Checker-Version: SpamAssassin 3.0 (2004-07-16) on
X-Spam-Level:
X-Spam-Status: No, score=0.4 required=5.0 tests=LINES_OF_YELLING autolearn=no
$ spamassassin -t < sample-spam.txt | grep X-Spam
X-Spam-Flag: YES
X-Spam-Checker-Version: SpamAssassin 3.0.0-pre2-r22977 (2004-07-16) on
X-Spam-Level: **************************************************
X-Spam-Status: Yes, score=1002.6 required=5.0 tests=ALL_TRUSTED,DCC_CHECK,

The output from the command using sample-nonspam.txt should have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required