On Tue, 17 Sep 2002, LuKreme wrote:
On Monday, Sep 16, 2002, at 17:20 Canada/Mountain, Timothy M. Admire
wrote:
I'm wondering if anything has a procmail recipe to filter out email
that has no body text as well as a script that can be used to filter
out email with certain attachments (ie: *.scr files)? If so, I'd
appreciate it if I could get my hands on them!
Filtering attachments is easy, (ahahahahahahah).
First check for a Content-type that is not text/plain. No sense doing
expensive searches on the body with plain messages
:0
* ! ^Content-Type:[ ]text/plain
{
:0B
* filname=.*\.scr
/dev/null
}
# Do nothing
Then you realize this will kill attachments named
"Star.wars.episode3.screenplay.txt"
So:
* filname=.*\.scr\>
About the empty body:
:0 B
* ! [a-z0-1]+
/do/what/you/want/to
I do not check the length of the body because you do not want
to accept a message with 5231Kb of blanks (I guess).
Bye,
Udi
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail