procmail
[Top] [All Lists]

Re: problem counting lines of text

1997-10-25 16:27:51
Adam Grove wrote,

| Thanks David for thinking about my question.

You're welcome.

| ...  Concentrating for now just on the first recipe
| that fails for me (^.*$), consider the following .procmailrc:
| 
| VERBOSE=on
| LOGABSTRACT=on
| COMSAT=no
| SHELL=/bin/sh
| LOGFILE=$HOME/procmail/logfile
| 
| :0 B
| * 1^1  ^.*$
| { }
| 
| NUMLINES = $=

| Now when I send this message to myself (the very message you are
| reading now, truncated at this point), the logfile becomes:
| 
| procmail: Score:       1       1 "^.*$"
| procmail: Assigning "NUMLINES=1"

Something seems hosed with your compilation of procmail.  Did you transfer
it whole from another platform instead of building it there?  Does the same
thing happen on mail you receive from outside your site as on mail sent
within it?  (Perhaps mail within your site has CR's instead of LF's or CRLF's
between lines, so procmail thinks there is no body at all?)

One more thought: try this, keeping VERBOSE on,

  :0B
  * 1^1 ^.*$
  { BLINECOUNT = $= }
  BNUMLINES = $=

  :0b
  BVERTSIZE=| wc -l

  :0H # default, but here I feel safer specifying
  * 1^1 ^.*$
  { HLINECOUNT = $= }
  HNUMLINES = $=

  :0h
  HVERTSIZE=| wc -l

  :0HB
  * 1^1 ^.*$
  { HBLINECOUNT = $= }
  HBNUMLINES = $=

  :0hb # default, but here I feel safer specifying
  HBVERTSIZE=| wc -l

and please let us know how the nine variables compare.

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