Subject: Re: Small problem with filtering

From: [email-masked] (David W. Tamkin)
Date: Tue, 9 Aug 1994 14:14:16 -0500 (CDT)

Matthew Stier asked,

| I've got a process that sends hourly status reports.  Of course 99% if them
| are okay.  The 1% failure, I'd like to know about though, but the Subject
| lines are identical between good and bad, but I can key of some text in the
| body of the message.
|
| Only problem, is that current recipe is not catching it.

| 	:0
| 	* ^Subject:.my.subject.key
| 	{
| 	        :0 Ac
| 	        ${HOME}/Mail/mymailfile
|
| 	        :1 AB
| 	        * 'mykeyword'
|
| 	        :0 E
| 	        /dev/null
| 	}

In the middle piece you have a starting line of a recipe, a condition, and a
null action line.  I gather that your actual rcfile does have some action
there and you just didn't include it when you wrote to the list.

We can reorganize it all like this and not need a sink to /dev/null, and in
any case you don't need an A on the first recipe inside the braces; that's
implied by what braces do.

         :0
	 * ^Subject:.*.my.subject.key
	 {
	   :1Bc
	   * 'mykeyword'
	   whatever_action_line_you_meant_to_have_there

	   :0:
	   $HOME/Mail/mymailfile
	 }

If MAILDIR is already set to $HOME/Mail, then you don't need the path to
the folder.

I've assumed that the apostrophes around mykeyword are just for illustration;
if you have literal apostrophes in the recipe, procmail will look for
apostrophes when it egreps.  That might be the problem.

David W. Tamkin  P. O. Box 3284  Skokie IL  60076-6284
[email-masked]   MCI Mail: 426-1818   +1 312 714 5610