procmail
[Top] [All Lists]

Re: [procmail] Kind of annoying.

2002-06-14 01:55:40
Bart Schaefer skribis:
On Thu, 13 Jun 2002, Udi Mottelo wrote:

Is it Okay now?

It's not, because he said he's not actually using procmail yet.

0 fw
* ^TOprocmail
sed 's/^Subject: /& [procmail] /'

If you're going to do that, better would be:

0 fhw
* ^List-Id:.*procmail
* 1^0 ^Subject:\/.*
formail -I"Subject: [procmail]$MATCH"

(Because formail will insert the Subject: line if for some reason it
was missing.)

From http://www.xs4all.nl/~rvtol/procmailrc.txt
here the snippet of my way to do it (that knows about `Re:').

:0
* DONE ?? F
*
^TO_()\/procmail(@(informatik|lists)\.rwth-aachen\.de|-users(_at_)procmail\(_dot_)o
rg)
{
  DONE=T
  pml="[procmail]"

  :0 fh w
  * ! ^Reply-To:
  | formail -a"Reply-To: $MATCH"

  :0
  *$ ! ^Subject:.*$\pml
  {
    # unset SUBJectTail
    SUBJT

    :0
    *$ ^Subject:${WSP}\/${NWSP}.*
    { SUBJT=" $MATCH" }


    :0
    *$ SUBJT ?? ^^${WSP}Re:${WSP}\/${NWSP}.*
    { SUBJT=" Re: $pml $MATCH" }
    :0 E
    { SUBJT=" $pml$SUBJT" }

    :0 fh w
    | formail -I"Subject:$SUBJT"
  }
}


-- 
Affijn, Ruud

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

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