procmail
[Top] [All Lists]

Re: getting the rule right.

1999-08-01 19:11:51
On Mon, 2 Aug 1999, Eric Smith wrote:
These two both fail to catch the mail
:0:
*^From .*vim-ret
vim


:0:
*^From .*vim-ret*
vim


I cannot understand why the last ones do not match the header above.
Any suggestions?

I could be corrected, but I believe that these can be seen to "say" look for 
the word "From" at
the beginning of the line, followed by a space AND THEN FOLLOWED BY ONE OR MORE 
CHARACTERS,
followed by "vim-ret".  In the second rule, the trailing * is unnecessary, and 
the two filters are
the same.  Since your data is "From vim-ret", the filter fails because of my 
upper-cased comment
above.  If you make either rule "^From.*vim-ret", it will trip, although with 
the possibility of
false positives in cases like "From anyvim-retiree", etc.  If you know that the 
^From line will be
the only only one that you wish to trap, try "^From vim-ret".

Best of luck,
  Steve 

------------------------------------------- 
E-mail: 
   Home:  steveh(_at_)iname(_dot_)com
-------------------------------------------


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