procmail
[Top] [All Lists]

Munging up the subject line

1999-09-29 12:14:24
At work, we have a bunch of mailing lists which insert [Listname] into
the subject line, which annoys me, and breaks mutt threading.  So, I
want to remove the [Listname] portion.

I'm currently using a two phase rule, where first the subject is
passed to sed for reduction, and then the new subject is passed to
formail.  I'm having a lot of trouble getting the quoting right such
that $SUBJECT is set correctly when the mail is dumped into the right
folder.

(For extra guru points, it would be cool to have a single recipie that 
manages all the lists that are done in this way.)

I'm currenly working with something like this:

:0
*^TOdevteam
{
   :0
   SUBJECT=|formail -x 'Subject:' |/bin/sed 's/ \[Devteam]//g'

   :0:devteam.lock
   |formail -I "Subject: ${SUBJECT}"  >> devteam
}

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