procmail
[Top] [All Lists]

Re: Appending Subject line

1999-06-17 07:37:05
Thomas R. Shannon wants

to append a "!" at the beginning of the Subject, then have it
delivered to the correct folder.  This will make the messages
appear at or near the top of the folder in a subject sorted
list. 

Is there a way to do this?

Try

        :0 fwh
        | sed '/^Subject:/s//& !/'

before delivering: in every header line that starts (^) with
"Subject:", it substitutes (s) that beginning (//) by itself (&),
followed by a space and an exclamation mark. The substitution
only occurs if there's really a line beginning with "Subject:" 
(case-sensitive) in the header, though; if you get messages with
"SUBJECT" or so every now and then, you can use [Ss][Uu][Bb]... 
to fix that. 

/HW

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