procmail
[Top] [All Lists]

Re: egrep matches, procmail doesn't -- what's wrong?

2000-03-01 14:05:58
On 1 March 2000, Hannu Koivisto <azure(_at_)iki(_dot_)fi> wrote:
Greetings,

I wrote the following rule to my .procmailrc:

:0 :
* 
^Subject:[[:alpha:][:space:]]*([^[:alpha:][:space:]][[:alpha:][:space:]]*){4}
potential-spam-notforme

If I try the same regexp on command line with egrep for line,...

Subject: >>> Incredible Car Care Products <<<

...egrep matches it,  but the rule in my  .procmailrc doesn't catch
mails with that line in  the header.

    I don't think Procmail supports POSIX character classes.

I've read the FAQ, KNOWN-BUGS etc., and I have 500 lines of
regexp-rules in my .procmailrc that work fine but I can't understand
what's going on with this one, especially when procmail(5) says that
procmail should be *completely* compatible with egrep(1) extended
regular expressions.  Any ideas?

    Common wisdom says you shouldn't believe everything you read. :-)
Actually, I think the regexp engine in Procmail was "completely
compatible" to egrep as egrep was at the time Procmail was written ---
which predates POSIX.2.

    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>