procmail
[Top] [All Lists]

Re: Altering the Subject?

1996-11-01 17:57:59
    > Actually, I got the (|) sequence to work, but never worked was having
    > the block after the initial filter
    > 
    > The verbose log looks like this on a failure
    > procmail: Assigning "SUBJ=Fri Nov  1 16:23:31 PST 1996"
    > procmail: Match on ! "^Subject: *\[testing\]"
    > procmail: Match on ! "^Subject: *re:"
    > procmail: Executing " formail -I "Subject: [$list] $SUBJ""
    > procmail: [15442] Fri Nov  1 16:23:35 1996
    > procmail: Assigning "LASTFOLDER= formail -I "Subject: [$list] $SUBJ""
    >  Subject: Fri Nov  1 16:23:31 PST 1996
    >   Folder:  formail -I "Subject: [$list] $SUBJ"                            
    394
    > 
    > SUBJ=`formail -zx Subject:`   # extract the subject
    > :0 w
    > * $! ^Subject: (Re:|*\[$list\])
    > {
    >   :0 w
    >   | formail -I "Subject: [$list] $SUBJ"
    > }

Jason,

This recipe is wrong: 

1. the '*' is misplaced; it should be after the blank following the
   colon, meaning "an arbitrary number of blanks".  I'm sorry if I had
   originally typed it this way.

2. the flags on the second recipe should be "fhW", where "fh" means
   "filter the headers", and "W" means wait for a successful result.

Also, If you have procmail 3.10 or 3.11, you can combine the subject
extraction by using the match pattern "\/" and then the MATCH variable
like this:

    :0 fhW
    * $!^Subject: *(Re:|\[$list\])
    * ^Subject: *\/[^ ].*
    | formail -I"Subject: [$list] $MATCH"

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

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