procmail
[Top] [All Lists]

Re: matching empty text/plain

2003-06-16 18:49:53
On Mon, Jun 16, 2003 at 03:55:47PM -0700, Bart Schaefer wrote:

I've updated <http://www.well.com/user/barts/email/mimepart.txt> to deal
correctly with empty body parts.

That's good, but it's a little long and hard to read.

Okay, here goes....  This is untested, obviously....

  WSPC=" ^I" # you-know
  NL="
"
  :0 B
  * 1^1   ^Content-Type:
  { PARTS=$= }

  :0
  * ! PARTS ?? ^^[01]^^
  *     ^Content-Type: multipart/.*boundary="\/[^"]+
  * $ B ^--$MATCH${NL}(\
         
Content-Type:[${WSPC}]+text/plain;?([${WSPC}${NL}]+charset=${DQ}.+${DQ})${NL}|\
         Content-Transfer-Encoding:[${WSPC}]+.+${NL})+\
         ()[${WSPC}${NL}]+
        ^--$MATCH{NL}
  { W="empty text/plain block" }

Does that look like it'll work?  What's it missing?

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Abuse / Whatever
  it.canada, hosting and development                   http://www.it.ca/


_______________________________________________
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>