procmail
[Top] [All Lists]

Re: Auto-reply according file extension.

2008-06-04 14:10:36
On 4-Jun-2008, at 05:12, Eduardo Luís wrote:
How can I return an email to sender if it contains a specific
attachment  file type?
What would be the recipe to procmail.rc?

Reliably?  You'd need to do some external processing with a deMIME util.

Start with looking at the Content-type header, and then look at the Content-Type line in the body. However, just doing this, will have the problem of triggering falsely on messages about, for example, this topic.

If the message you want is JUST an attachment with no "Hi, here's the file you wanted" then the filename (and extension) will be in the headers, making it much easier to avoid false positives.

:0
* ^Content-type:.*"\/\.pdf"
{ FILENAME = $MATCH }


--
Sarah, age 18, says "man, once you go crayola you can't go back."


____________________________________________________________
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