procmail
[Top] [All Lists]

Re: How to alter Subject

1998-11-11 05:28:25
Inge Balswick had a problem with this recipe:

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

... because it adds "[Cirrus]" *every time* when messages are replied
to or forwarded. 

The second line is supposed to prevent that, but in its current form
it only checks whether "[Cirrus]" appears right at the beginning of
the subject, preceded only by whitespace. If you don't want to add the
string any more as soon as it already appears *anywhere* in the
subject, change the line to
        * ! ^Subject:.*\[Cirrus]

(Does the "]" have to be escaped here? I don't think so, but please
correct me if I'm wrong.) 

/HW

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