On Tue, 9 Mar 2004, Jason Borkowsky wrote:

> Anyone know the magic to get spamc to operate as
> spamassassin re:  spamassassin --exit-code ?

   Spamc operated under a different paradigm than SpamAssassin;
spamc is an executable program that connects across a network
to a machine running spamd, spamd does all the heavy lifting,
passes the findings back to spamc, which then spits the finished
product to stdout.  The exit code in this instance is an indicator
of whether spamc was able to communicate with (the remote) spamd
process, and whether that process was successful (i.e. spamd
returned valid data, spam or not).

   To make matters worse, SpamAssassin's scores are reals and
UNIX's exit codes are ints.  You just don't want to fiddle with
the exit code because you may need it for something else.

> It is possible to filter the message twice, but
> if spamc were to return the exit code regardless
> if -c were set, double filtering isn't required.

   What happens if your spamd dies and spamc, operating in its
normal mode cannot communicate with spamd?  It'll quit with a
non-zero exit code and procmail (or whatever your delivery mechanism
is) should do the right thing and get the original text of the
message back.  How, in that case, does one tell if the spamc/spamd
handshake actually worked?

> Yes, I have been told I can install procmail and
> so on, but if I could get the exit code instead,
> my job is done and no additional programs need to
> be installed.

   Run messages through a default spamc to a temp file, grab the spam
score, and do with that what you want.  Double-scanning is not the
answer, especially if you've got a busy site.

+------------------------------------------------+---------------------+
| Carl Richard Friend (UNIX Sysadmin)            | West Boylston       |
| Minicomputer Collector / Enthusiast            | Massachusetts, USA  |
| mailto:[EMAIL PROTECTED]                        +---------------------+
| http://users.rcn.com/crfriend/museum           | ICBM: 42:22N 71:47W |
+------------------------------------------------+---------------------+

Reply via email to