SPAMC(1) User Contributed Perl Documentation SPAMC(1)
spamc - client for spamd
spamc [-c] [-d host] [-f] [-h] [-p port] [-s max_size] [-u username] [-e command [args]]
-B Assume input is a single BSMTP-formatted message. In other words, spamc will pull out
everything between the DATA line and the lone-dot line to feed to spamd, and will
place the spamd output back in the same envelope (thus, any SIZE extension in your
BSMTP file will cause many problems).
-c Just check if the message is spam or not. Set process exitcode to 1 is message is
spam, 0 if not spam or processing failure occurs. Will print score/threshold to std-
out (as ints) or 0/0 if there was an error.
Connect to spamd server on given host.
-e command [args]
Instead of writing to stdout, pipe the output to command's standard input. Note that
there is a very slight chance mail will be lost here, because if the fork-and-exec
fails there's no place to put the mail message...
Note that this must be the LAST command line option, as everything after the -e is
taken as arguments to the command (it's like rxvt or xterm).
-f Cause spamc to safe-failover if it can't connect to spamd -- what this means is that
in case spamc fails to connect to spamd, it will not return with an exitcode set, it
will instead dump the original message to stdout, allowing the message to be deliv-
ered, albeit unscanned for spam. Without this flag, connection failures to spamd will
cause message delivery failures.
Even with this flag set however, if spamc connects successfully, and then encounters
an error at a later stage of communication, it will still return an exitcode.
This now defaults to on, and can't be turned off. This flag is accepted though for
-h Print this help message and terminate without action
Connect to spamd server listening on given port
Set the maximum message size which will be sent to spamd -- any bigger than this
threshold and the message will be returned unprocessed. Note that the default size is
250k, so if spamc gets handed a message bigger than this, it won't be passed to spamd.
The size is specified in bytes, and if you send it a negative number, things are quite
likely to break very hard.
This argument has been semi-obsoleted. To have spamd use per-user-config files, run
spamc as the user whose config files spamd should load. If you're running spamc as
some other user, though, (eg. root, mail, nobody, cyrus, etc.) then you can still use
Spamc is the client half of the spamc/spamd pair. It should be used in place of "spamas-
sassin" in scripts to process mail. It will read the mail from STDIN, and spool it to its
connection to spamd, then read the result back and print it to STDOUT. Spamc has
extremely low overhead in loading, so it should be much faster to load than the whole spa-
See the README file in the spamd directory of the SpamAssassin distribution for more
spamd(1) spamassassin(1) Mail::SpamAssassin(3)
Craig R Hughes <email@example.com>
perl v5.8.0 2002-09-02 SPAMC(1)