On Wed, Nov 03, 2004 at 11:25:14AM +0000, Brett Parker wrote:
On Wed, Nov 03, 2004 at 08:53:34AM +0000, Chris Green wrote:
This is (probably) only of interest to anyone who uses procmail to sort their incoming mail into different mailboxes.
Many of the mailing lists I subscribe to (including alug) insert the mailing list's name into the subject line. I got fed up with this as it wastes useful space that would be better used to show me the subject. I very often (used to) lose the end of the subject off the RHS of my screen. I already know what list the mail is from because procmail has put it pinto the appropriate list mailbox.
So I played around with my .procmailrc file, read the manual pages a few times and came up with the following recipe which removes the list name from the subject (as well as storing the mail in the appropriate mailbox, as before) :-
:0 fh * ^TOalug | sed 's/\[ALUG\]//' :0 A: alug
Interesting snippet, doesn't take in to account that you only really want to mess with the Subject: header though, does it. Which means that it will cheerfully play with any of the headers that happen to have [ALUG] in them. Not nice.
I realised this but decided it was almost certainly irrelevant, what other (significant) part of the header is remotely likely to have the string '[ALUG]' in it? It's only if I reply to a message that the change will get out again anyway.