Matt Silva wrote:
Ok spamc seems to be working now. So how do I do this ... "-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."
Something like the following should work. Pass it a filename and it should tell you if it's spam or not. Modify the stuff in the if-then clauses to do what you want.
For feeding an mbox-style mailbox through it, you probably want to something like:
cat mbox | formail -s ./mynewspamfilter.sh > mbox.filtered
Actually, if you tell me what you're trying to do, I might have some ready-to-go scripts to give you. I've got some that take a virus-ridden inbox and check each message for spam and output the non-spam messages to something like "mbox.filtered".
---- mynewspamfilter.sh ----
#!/bin/sh
if(cat "$1" | spamc -c ) then echo "Spam" else cat "Not Spam" fi
smime.p7s
Description: S/MIME Cryptographic Signature
