procmail
[Top] [All Lists]

Re: mail filtering with 2 recipe

2001-03-01 02:13:41
++ 28/02/01 10:08 -0600 - Matthew W. Roberts:
Not sure exactly what behavior you want, but the following may do
the trick.  I've added the `a' flag to the second recipe.  Also,
note the `:' at the end of the first recipe to force procmail to use
a lockfile -- usually a good idea when saving to a file.

              * ^From.*peter.*
              {
                      :0c :
                      peter

                      :0 ha
                      auto reply scripts.
              }


Three small additions

- In the first place, add an extra line before the entire recipe with
  ":0" on it. Otherwise procmail won't see this as a recipe.

- Remove the last ".*" from the first regexp. It's not needed here and
  it'll only slow down procmail.

- And last but not least, i expect the one who asked the question he
  wanted to filter on the contents of the From: field, not the From_
  field. Therefor, tighten the regexp a bit.

So, you'll end up with a thing like:

  :0
  * ^From: .*peter
  {
        :0c :
        peter

        :0 ha
        [auto reply scripts]
  }

And yes, one could even tighten that first regexp even more.

HTH, -R.

-- 
# rejo(_at_)sisterray(_dot_)xs4all(_dot_)nl (pgp: see headers) - 
http://www.sisterray.nl
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Re: mail filtering with 2 recipe, Rejo Zenger <=