procmail
[Top] [All Lists]

Re: long mailing-list names in Subject line

2001-04-03 20:27:23
I got this to work with:

###################################
:0
* ^Sender.*scfn
   {
   :0fhw
   * ^Subject: \/.* \[scfn-list\] \/.*
   | formail -I"Subject: $MATCH"
      {
      :0a:
      scfn
      {
   }
###################################

but then Subject lines such as

    Subject: [scfn-list] more photos

didn't match properly.

How can I get the regex '\/.*' to match both of 
the below subjects?

    Subject: [scfn-list] more photos
    Subject: Re: [scfn-list] more photos

Dave

--
From: Timothy Luoma <elists(_at_)1stpc(_dot_)org>
Date: Wed, 28 Mar 2001 23:13:56 -0500


So, if a Subject line appears as:

  Re: [scfn-list] quick question

I want it to appear as:

  Re: quick question

I think I've got this one.... $MATCH is the key

:0fhw
* ^Subject: \[scfn-list\] \/.*
| formail -I"Subject: $MATCH"

I'm not sure that you need to escape the [ and ] but I'm pretty sure 
you do.  You might even need to escape the - but I don't think so.

I guess you could combine this with a delivery recipe too... just add 
this immediately following the above recipe

:0a:
scfn-list

Tim
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail