procmail
[Top] [All Lists]

Re: how to match against first N lines/bytes of body?

1997-11-13 13:51:43
Dan Smith suggested to Adam Grove,

| but you said either N lines or N bytes so make that simply
|    N=5000
|    :B
|    * $ < ${N}
|    { ... process message of about < N bytes ... }

Size conditions ignore H and B on the flag line and always work on HB unless
another search area is specified on the condition's own line.  To test ONLY
the body,

   :0
   * $ B ?? < $N
   { whatever }

This syntax would obey a B flag on the flag line:

   :0B
   * -1^1 .
   * -1^1 ^.*$
   * $ $N^0
   { whatever }