Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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 tried this:

folder-hook . 'color index green black "~B \"Content-disposition: attachment;\""'

but got nothing except exceptionally slow rendering of the inbox.

Is there any way to do this, or generally anything that will allow me to see messages with attachments in the index (flags etc..) that can be solved by configuration and not patching.

share|improve this question
up vote 3 down vote accepted
color index green black "~X 1-"

That is match message with 1 or more attachments.

works with my version of mutt (mutt-patched 1.5.21-5nntp1) though it looks like it's available in the vanilla version from mutt.org as well and has first been introduced in 1.5.12 released in September 2005.

It's going to be slow in any case, because to find out about attachments, you have to read the body (so that means the emails will have to be downloaded). Or you can use Dennis solution that gives a good approximation in most cases.

share|improve this answer
Which distribution is this? Or where can the exact sources be found? Without that information, your answer tells little. – vonbrand Mar 2 '13 at 20:43
That actually works, in version 1.5.21 (2010-09-15). Although the thing is very slow, which I don't understand since I am running it on with 8CPUs and 8 GB RAM... – majkinetor Mar 3 '13 at 18:07
What does ~X signifies ? It says "References" field ? – majkinetor Mar 3 '13 at 18:20

Why not do ~H \"Content-type: multipart/mixed\"? That way it doesn't need to look at the body of each message.

A completely statistically bogus sample of a handful of my messages is that multipart/mixed is used for messages with attachments, and multipart/alternative for messages that have an html and plain text variant but no attachments.

share|improve this answer
ITYM ~h instead of ~H. Note that it will miss at least the signed messages with attachments. – Stéphane Chazelas Mar 2 '13 at 20:26
and with big T in type. This is very slow, way slower then ~X. – majkinetor Mar 3 '13 at 18:27

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.