I'm writing in reaction to a request on mutt-users, but this is not really a response to that post -- it's more a response to a recent upswing in requests of this type.
It would be straightforward to add a search pattern specifically for content-types since we already have code to work with those in the attachment-counting interface. The content parse is a costly task, but the counting code does that opportunistically and the search code could do the same. There would be no performance impact to adding this capability, only for choosing to use it, and only then at the time that you're executing the search. (It would not cause a general slowdown to use the capability and then stop using it.) As a second step, and something I've never thought of before, it should be possible in principle to stash MIME parse trees (or enough of them to meet the needs of attachment counting and c-t searches) in the header cache. Thoughts? Personally I'm +1 on the first and +0 on the second. * On 18 Jul 2012, David Champion wrote: > You can search e.g. for > > ~b "content-type: text/calendar" > > or, for IMAP, > > =b "content-type: text/calendar" > > But that's a somewhat costly operation because it searches all message > bodies. > > It may be feasible to add a search pattern for this; I'll post about > that in mutt-dev. > > * On 18 Jul 2012, Alexis Letessier wrote: > > Hi, > > > > Is there a filter to select mails with text/calendar attachments? > > > > Best regards, > > Alexis -- David Champion • d...@uchicago.edu • IT Services • University of Chicago