procmail
[Top] [All Lists]

Re: emails with image but no text in the body

2010-08-26 14:16:18
At 10:27 2010-08-26, ProcMail wrote:
Does anyone know how to write a procmail recipe to match emails with an image attachment but no text in the body? e.g. If no a-z in the body

I haven't needed to, but it can be done. Do you have a specific example you're trying to match?

Look for messages with Content-Type: multipart/(mixed|alternative), and no text/(plain|html).

# untested
:0
* 9876543210^0 ^Content-Type:[  ]*image/gif
* ^Content-Type:[       ]*multipart/
* B ?? ^Content-Type:[  ]*image/gif
* ! B ?? ^Content-Type:[        ]*text/
{
        # should be a message with a GIF image attachment but no text
        # (plain or HTML) portion
}


FTR, your choice of email name is probably going to screw more than one participant up if they've got autocompletion in their email client.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

____________________________________________________________
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

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