procmail
[Top] [All Lists]

Re: procmail searching the body of mail

2000-10-08 05:11:52
From: Subba Rao <subb3(_at_)attglobal(_dot_)net>

I am trying to look for some keywords in my mail. I have tried the
following receipe and it does not seem to be working.

:0 B
* (procmail|xyz.com)
{
      Perform from action.
}

Is this the right way to look for keywords in the email?

Your condition line (second line in recipe) looks okay to
me.  You probably want to quote the period, so that it
doesn't represent "any single char" as it does otherwise
per regular-expression rules.

  * (procmail|xyz\.com)

What is *not* right is your action statement inside the
curly braces.  You would need, inside the braces,

        :0
        | perform some [er, what did you mean by "from"?] action


However, for one action or logical set of piped actions,
you don't need curly braces at all.  Just

        :0 B
        * (procmail|xyz\.com)
        | perform some action

Be sure to look over "man procmailex" and "man procmailrc".
They are quite helpful.


At the begining of the receipe, does it matter ":0 B" or ":0B"?

No.  Spacing here doesn't matter to procmail.  (See "man procmailrc"
for corroboration.)

-- 
Netcom has imploded.  Please now use NOTnetcom.com for mail.
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Ex-Netcommies:  Mail "forwards" for free forwarding service!
NOT affiliated with EarthLink, Inc.'s Netcom brand identity.

_______________________________________________
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>