On Thu, Mar 20, 2003 at 07:41:37AM -0800, Tyler F. Creelan wrote:
In the spamassassin manual, the "-e" option is described:
-e, --error-code, --exit-code Exit with a non-zero exit code for spam
or "-c" for spamc/spamd. I think you could use this in a recipe with,
for example:
:0:
* ! ? spamc -c
$TRASH
although this doesn't seem to work, that is, the condition tests
negative even when spamc returns a non-zero exit code. Any ideas? Is
it not possible to negate a "?" exit code condition?
In any case I think this would work instead:
:0c
| spamc -c
:0e:
$TRASH
or "spamassassin -Pe" (?) if you're not using spamc/spamd.
I used to use something like this, tho I can't remember the exact recipe
now:
:0:
* ! ? $SPAMASSASSIN -e
spam
However I found that spamassassin's exit codes were unreliable.
Sometimes my recipe would exit 0, but when I ran spamassassin from the
cmd line on the same msg, it would exit a non-zero number (ie, spam). I
could never reproduce this or track it down. But this happened rarely
and perhaps it's fixed in newer versions.
--
- Matt Dunford <> zoot(_at_)zotikos(_dot_)com ..
-. www.zotikos.com -- o,;-
Fear the Lords who are secret amoung us.
The Lords w/ in us.
Born of sloth & cowardice
-Jim Morrison
--
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail