On Wed, Oct 27, 2004 at 01:44:42PM -0400, William Park wrote:
How do I use 'procmail -m ...' ?
Basically, I'm downloading just the headers from POP3 server, and I
would like to use Procmail recipes to test for spam. Suppose, I have
file 'testforspam.rc' with recipes
:0
* ^Subject:.*viagra
spam
1. If I pipe a header with "viagra" subject,
cat ... | procmail -m testforspam.rc
it matches, and the content will be saved to file 'spam' just like
normal delivery, and Procmail returns success (0). Good.
2. But, if I pipe non-"viagra" header, it falls off the end of recipes.
Normally, Procmail will deliver it to my system mail box. But, when
I tried
cat ... | procmail -m testforspam.rc
it returns failure (73) without delivering to my system mail box.
This is the result I want. But, is this how I use 'procmail -m ...'?
Have you set $DEFAULT anywhere? Such as inside testforspam.rc?
E.g., to /dev/null? Another thing you can do is unset or reset
(to a bogus value) $HOST at the end of your .testforspam.rc .
I use "procmail -m" in the point-n-shoot.sh diagnostics script
that comes in the Virus Snaggers toolset, and I've never seen your
failure code running it.
--
dman
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail