procmail
[Top] [All Lists]

Re: Altering the Subject?

1996-11-01 16:37:21
    > Why did this fail with the extranious flags message?
    > :0 fw
    > * ! ^Subject: *\[$list\] *
    > * ! ^Subject: *re: *
    > {
    >   SUBJ=`formail -zx Subject:`   # extract the subject
    >   :0
    >   | formail -I "Subject: [$list] $SUBJ"
    > }

Jason,

1. The 'f' flag is only useful on a filtering *action* recipe, not a
   nested block recipe.

2. When you use a variable in a condition, you must prefix the condition
   with a '$' flag:

    * $! ^Subject: $some-variable

   will work, but

    * ! ^Subject: $some-variable

   will not.

3. The second condition is not necessary.  If you wish to match a
   subject which is tagged, and which is not a reply, use this
   condition:

    * $! ^Subject: *(Re:|\[$list\])

4. A trailing "*" is never necessary, unless you are also matching text
   for the MATCH variable.  Otherwise, why do you care if there are an
   abitrary number of spaces after the "Re:"?

Hope this helps.
___________________________________________________________
Alan Stebbens <aks(_at_)sgi(_dot_)com>      http://reality.sgi.com/aks

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