Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.