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 X-Spam-Status: No
, and that of sample-spam.txt
should have X-Spam-Flag: Yes
and X-Spam-Status: Yes
.
SpamAssassin can verify its configuration files with the --lint
flag and report any errors. In the following example, a score
entry does not...