procmail
[Top] [All Lists]

Re: empty body

2004-02-09 12:57:07
Toen ik R A Lichtensteiger kietelde, kwam er dit uit:
Gary Funck wrote:

Yup. I was a little hasty on that one. Incorporating Ruud's
suggestion, here's the "best practices" final version:

  SPACE = " "
  TAB = " "
  WS = "$SPACE$TAB"

  :0:
  * $ B ?? ^^([$WS]|$)*^^
  empty-body.mbox

Hmmm -- may I suggest adding a test on message size before feeding a
(possibly huge) msg body to the regex?

  :0: # I chose 500 bytes to allow for maillists with many relay-hops
  * < 500
  * $ B ?? ^^([$WS]|$)*^^
  empty-body.mbox

Would that really be better? The regexp is false at the first 
non-whitespace in the body. And what if the body contained 
just over 500 bytes of whitespace? 

To calculate the size of the body, it needs to read the whole 
body anyway...


Is B limited by LINEBUF?

Q5: Isn't that '< 500' just limiting the headersize?

-- 
Affijn, Ruud

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