procmail
[Top] [All Lists]

Re: message size into subject?

2008-02-29 23:36:06
Dallman Ross wrote:

  :0 HB
  *  1 ^1 .
  *  1 ^1 ^.*$
  * -1 ^0
  { SIZE = $=

...

  }

Btw, the part near the top that finds the size is a very
old trick originally from, I believe, David W. Tamkin.

If Dallman's belief is correct, then I'm the one who owes everyone an
apology for it.  The way to get the size of a message into a variable is
this:

  :0
  * 1^1 > 1
  { SIZE = $= }

or if you're feeling silly, each of these is equivalent to the sensible
way to write the condition:

  * 1^-1 < 1

  * -1^1 > -1

  * -1^-1 < -1

Size conditions operate on the HB space regardless of colon-line flags,
so it's not necessary to specify HB on the colon line to get the body
included.  H ?? or B ?? on the condition line can override that, but
here we don't want to.
____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>