procmail
[Top] [All Lists]

Re: formail recipe problem

1996-06-17 14:14:39
Chuck Campbell <campbell(_at_)Starbase(_dot_)NeoSoft(_dot_)COM> writes:
I have a problem with the following recipe.  It creates a mail folder with
the name "formail -a Status: O"

the actual file name is exactly what is in quotes, spaces and all.

This is clearly not my desired intention.  What have I done wrong here?
...
:0
* ^Subject:.*subscribe
|formail -a "Status: O" ;/dev/null

Not only is it clearly not your intention, but it is not clear what
your intention is.  Do you want any messages with subscribe in the
header to simply have their "Status:" header changed to contain "O"?
If so, you left off the 'f' and 'h' flags:

:0 fh
* ^Subject:.*subscribe
|formail -a "Status: O"

You may want to use the '-I' flag instead of the '-a' flag, as you
probably want to replace any Status: line that exists.

On the other hand, perhaps you meant to discard the messages completely:

:0  h
* ^Subject:.*subscribe
/dev/null

(The 'h' flag here is a performance tweak.)

Philip Guenther

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