Re: Can not get a filter recognised for one email source

[email protected] (Professional Software Engineering)
Newsgroups gmane.mail.procmail
Organization Professional Software Engineering
Message-ID <[email protected]>
At 07:10 2011-02-16, N.J. Mann wrote:
>With a regexp of
>   ^From: .*Debra
>it will not match
>   from: [email protected]
>because it is expecting 'from:' followed by one space, followed by one
>'any' character, followed by zero or more 'any' characters,

WRONG.

First, Procmail is case insentitive unless told otherwise (via a 
recipe flag), so, From/from doesn't matter one iota.  It also does 
not "ignore" headers that don't conform to the 
first-character-capitalized format.

Second, the * is a count modifier, which modified the immediatley 
preceeding regexp (in this case, dot, which is a single character 
wildcard): .* means zero or more of any character.  It DOES NOT mean, 
precisely one character, followed by zero or more of 
anything.  Therefore space dot star WILL match a space, or ten 
spaces, or a space followed by a name, or whatever.  It is not the 
same as dot star, because it enforces that the first character must 
be a space.  I don't see this as a problem, though certainly a lot of 
people might choose to omit the space as a requirement, as the colon 
itself is the demarc between the header name and the content 
(exception: the ^from_ line, which uses a space - but then, you'd be 
specifying the space in place of the colon anyway).


OP: I've got to wonder - are these headers perhaps appearing in a 
digest?  So, you're seeing them in the MBX, but they're really not 
standalone messages - there's a true set of headers somewhere above?

---
  Sean B. Straw / Professional Software Engineering

  Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
  Please DO NOT carbon me on list replies.  I'll get my copy from the list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.