procmail
[Top] [All Lists]

Re: attach filter

2001-08-01 10:06:57
:0
* !^FROM_DAEMON
* !^X-Loop: jmymiail(_at_)mydomain
* ^Content-Type: *multipart/mixed 
{
   :0 fbw
   * ^Content-Type: *application/msword
      {
      * ^name*\.[Dd][Oo][Cc].*
      | do something
      }
}

Nothing to do, it catch the multipart/mixed, and nothing else....

That "Content-Type" is likely to appear in the body, not the
headers, for an "attachment" mail.  Thus, you probably want B, not b,
in your flags where you have :0 fbw.

Why the f flag?  That says to "filter" so you can do something else
with the result.  (You said you wished to reply, and didn't mention
filtering, or changing, the body or headers).

Your "name*" etc. says "nam" followed by zero or more "e" characters
followed by ".doc"; i.e., "nam.doc", "name.doc", "nameeeeeeeee.doc"
etc. -- probably not what you intend.

Also, you don't need "[Dd][Oo][Cc]"; you can just use "doc"
since recipes are case-insensitive unless you use the "D" flag.

(Picking out stuff from arbitrary attachments tends to be pretty
messy with procmail, by the way, since it doesn't understand MIME
and so much of the information appears in the body, and there can
be more than one MIME part, or even discussions about MIME, that
you will have a hard time distinguishing from.  Good luck.)

Hope that helps,
Stan
_______________________________________________
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>