Remove prefix from subject header in index view

maildropmutt

I subscribed to several mailing lists that prefix the Subject:
header with a fixed string like [list-foo]. This clutters my index
view and limits the usable space.

I'd like to strip this [list-foo] header from the index view.
What's the best way to achieve that? Maybe a regular expression can
be hooked into the index_format setting? I don't necessarily need
to strip the prefix permanently, it's sufficient to not display it
in the index. It may still show up in the pager and be included in
responses.

I know that Claws-Mail has a function that does exactly this. It's called Simplify Subject RegExp.

If this is not possible using mutt I guess one option would be to
permanently change the headers using a mail filter like maildrop
(which I use for sorting, though not for header manipulation). Feel
free to also add a solution that uses maildrop to strip the prefix
from the headers.

Best Answer

Munging the subject is possible with subjectrx. Available since mutt 1.8.0.

Mutt manual, 12. Display Munging

Related Question