procmail
[Top] [All Lists]

Parse body but not attachment

2002-01-04 14:42:42
I realized I made a big mistake in many of my procmail recipes this morning when I noticed procmail was consuming all of the CPU on our mail server. The load was around 4 and climbing. :-( The problem was with a user that received 3 15MB messages in one shot. I have recipes like the one below that match on a single string in the body (some in the headers).

##  --  advertising.com
:0 BH
* advertising.com
* $ ! ^X-Loop: $ABUSE
{
        :0f
        | formail -I "X-Spam: advertising.com" \
        -I"X-Loop: $ABUSE"

        :0:
        /var/spool/mail/quarantine/spam/advertising.com
}
##  --  advertising.com

The problem is (I believe) that procmail isn't only parsing the body (and headers in this example), it's also parsing my attachment. That's what I need to stop. I would rather not say 'don't scan messages with attachments' because lately my spam has been both HTML & plain text and this would allow those spams around that recipe. I would rather say, if the message has a MIME-type attachment to ignore the attachment. Or something like that. Does anyone have an suggestions on doing this? I can't believe I overlooked it the first time around. Thanks

Justin
--

--
Justin Shore, ES-SS ES-SSR      Pittsburg State University
Network & Systems Manager       Kelce 157Q
Office of Information Systems   Pittsburg, KS 66762
Voice: (620) 235-4606           Fax: (620) 235-4545
http://www.pittstate.edu/ois/

Warning:  This message has been quadruple Rot13'ed for your protection.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>