procmail
[Top] [All Lists]

Re: getting the rule right.

1999-08-03 01:01:32
Here is the first bit of the _first_ (normally hidden header of mails
from the vim list.  I want to use this header to trap mail from the
list.  There is a reason why I want to use this particular header.

From vim-return-152


This catches the mail but is too indiscriminate:
:0:
*^From .*vim*
vim

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?

One of the best things to do, if you have something happening that you
don't understand, is to set the VERBOSE variable in your .procmailrc and
get procmail to tell you exactly what it is doing.

Your regular expressions should be OK, but they aren't doing exactly what
you expect:

  '.*vim-ret*'
will match:
  .*        0 or more of any character
  vim-re    those literal characters
  t*        0 or more 't's

But that's OK - it won't match in the way you expect but it should still
match.

Are these the first recipes in your rc file or are there others that
might be matching beforehand?

Use VERBOSE to get more information.  If that doesn't give you the answer,
use VERBOSE to give *us* more information! :-)

Regards,
Marty
-- 
Martin McCarthy                   /</       PGP key available
Home:         marty(_at_)nostrum(_dot_)com   \>\
http://www.ehabitat.demon.co.uk/  /</


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