procmail
[Top] [All Lists]

Re: Recipe to Catch E-Mail w/o Body? With Certain Attachments?

2002-09-17 11:59:40
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 you could try
filename=/*\.scr"

But I've not tried that myself since I keep forgetting to check if you have to escape the " and besides, who's gonna send me a Script for Star Wars Episode 3 anyway?


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail