I'm thinking about adding at least one new SEARCH command extension to Dovecot: ability to search from any headers in the mail, including MIME headers in the body. So the idea is that you could somewhat quickly ask e.g. "show me all mails with pdf attachments":
a search or x-anyheader application/pdf x-anyheader .pdf b fetch $ bodystructure
The client can verify the results with the fetch. The "x-anyheader" can already be implemented without changes to full text search plugin, because all backends store message/MIME headers and body text separately.
So, questions for the list, especially client developers:
What's a better name for x-anyheader? :)
Any other ideas about search extensions you'd want to see? Maybe I could get this standardized at some point.
I think one other thing missing has been "show me messages that have attachments". I've thought about maybe creating a $hasattachments keyword for that, which the server could automatically set for new mails that it thinks has attachments (and clients can set/unset the keyword if wanted).