procmail
[Top] [All Lists]

Re: spotting empty continuation lines

2000-02-25 13:05:08
On 25 February 2000, David W. Tamkin <dattier(_at_)mcs(_dot_)net> wrote:
Sometimes I'll receive a message with a header field where a
continuation line is empty except for the indenting whitespace.  I'd
like to catch those in a recipe.

The problem is that the newline before a properly indented
continuation line in a header won't match procmail's $ or ^ (usually
that's a good thing).

  * H ?? ? egrep '^[  ]+$' # egrep -x '[      ]+' if it groks -x

will do it, but is there a way within procmail without the external
program?

    I don't think there is.  AFAICT, Procmail unfolds the continuation
lines (presumably because the break points don't have any semantic
relevance), so the best you can do without calling an external program
is find out if there are trailing blanks.

    Regards,

    Liviu Daia

-- 
Dr. Liviu Daia               e-mail:   Liviu(_dot_)Daia(_at_)imar(_dot_)ro
Institute of Mathematics     web page: http://www.imar.ro/~daia
of the Romanian Academy      PGP key:  http://www.imar.ro/~daia/daia.asc

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