spamc is the client side of the spamc/spamd pair. It is meant to be called by scripts, although there is no reason that it cannot be run manually. It is written in C and is meant for high performance. spamc reads from STDIN and then reads the results back from spamd and presents the output on STDOUT. The options it accepts are broken down by function in the next sections.


-B                                 BSMTP mode

Treat input as an SMTP-formatted message.

-c                                 check only

Print score/threshold and set exit code to 0 if message is not spam or 1 if it is spam.

-r                                 report if spam

Print report for spam messages.


Print report for all messages.


Output spam test names that are executed.

-d host

Specify host to connect to spamd on; defaults to ...

Get Slamming Spam: A Guide for System Administrators now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.