Subject: Re: What is wrong with this rule?

From: [email-masked] (David W. Tamkin)
Date: Sat, 31 Dec 1994 16:14:37 -0600 (CST)

Robert Nicholson wrote,

| STUPIDUSERS=$HOME/Mail/.stupidusers
| 

The `f' flag doesn't belong here.  You aren't going to filter mail through
the braces.  Moreover, what does the condition gain you?  All mail should
match it.

| :0f
| * ^TO.*
| {
|     FROM="`formail -rx To:`"

The `f' flag belongs here:

|     :: 
|     * ? fgrep -e "$FROM" $STUPIDUSERS >/dev/null
|     | formail -I Message-ID: ; echo "   Removed Message-ID" >/dev/console
| }

| I get.
| 
| procmail: Extraneous filter-flag ignored

Of course.  An `f' flag makes no sense at the entry to a brace block.
By not having it where you do need it, you're probably losing all mail
where "$FROM" is in the .stupidusers file.

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

---

From: "Michael J. Corrigan" <[email-masked]>
Date: Sat, 31 Dec 1994 14:32:49 -0800

Another way to say what David said:
The 'f' flag makes sense only when the action is a pipe; a nesting block
is not a pipe action.

How about simply:
STUPIDUSERS=$HOME/Mail/.stupidusers
FROM="`formail -rx To:`"

:0f
* ? fgrep -e "$FROM" $STUPIDUSERS >/dev/null
| formail -I Message-ID: ; echo "   Removed Message-ID" >/dev/console

Also procmail can't get the lockfile name implicitly from 
| formail -I Message-ID: ; echo "   Removed Message-ID" >/dev/console
in 
:f:
* ? fgrep -e "$FROM" $STUPIDUSERS >/dev/null
| formail -I Message-ID: ; echo "   Removed Message-ID" >/dev/console

so if you want one you need to give it, although I don't see what you
need a lockfile for.

> STUPIDUSERS=$HOME/Mail/.stupidusers
> 
> :0f
> * ^TO.*
> {
>     FROM="`formail -rx To:`"
>     :: 
>     * ? fgrep -e "$FROM" $STUPIDUSERS >/dev/null
>     | formail -I Message-ID: ; echo "   Removed Message-ID" >/dev/console
> }
> 
> I get.
> 
> procmail: Extraneous filter-flag ignored
> 
> Procmail V3.10
>