{"id":512,"date":"2009-03-14T23:04:56","date_gmt":"2009-03-15T05:04:56","guid":{"rendered":"http:\/\/www.mooreds.com\/wordpress\/archives\/000512"},"modified":"2009-03-14T23:22:07","modified_gmt":"2009-03-15T05:22:07","slug":"speeding-up-thunderbird-search-with-imap","status":"publish","type":"post","link":"https:\/\/www.mooreds.com\/wordpress\/archives\/512","title":{"rendered":"Speeding up Thunderbird Search with IMAP"},"content":{"rendered":"<p>I like the <a href=\"http:\/\/www.mozillamessaging.com\/thunderbird\/\">Thunderbird email client<\/a> a lot (Thunderbird2).\u00a0 I used to use and love <a href=\"http:\/\/www.washington.edu\/pine\/\">pine<\/a>, though, so perhaps you should take any accolades with a grain of salt.<\/p>\n<p>I use Thunderbird with IMAP so that I don&#8217;t have to worry about backing up my email locally, and so that I can always ssh in and view new mail if I&#8217;m on a different computer (&#8216;less&#8217; is my mail client then!).<\/p>\n<p>It has a lot of plugins, but the <a href=\"\/wordpress\/archives\/000449\">only one I really used<\/a> was <a href=\"http:\/\/www.mozilla.org\/projects\/calendar\/lightning\/\">lightning<\/a>, the calender\/task management plugin.\u00a0 And then I got a Palm, and haven&#8217;t been able to find any way to hook the calendar on the palm up to lightning (there is <a href=\"http:\/\/kb.mozillazine.org\/PalmSync_(Thunderbird)\">support for syncing contacts<\/a>).<\/p>\n<p>Anyway, one thing that got me really riled me up was the slow search.\u00a0 This <a href=\"http:\/\/forums.mozillazine.org\/viewtopic.php?f=39&#038;p=4634235\">post illuminated the facts for me<\/a>; it wasn&#8217;t Thunderbird that was slow, it was my IMAP server.\u00a0 I upgraded my IMAP server to <a href=\"http:\/\/www.dovecot.org\/\">dovecot<\/a> 1.1.7, that being what my hosting provider supported.\u00a0 Dovecot has a <a href=\"http:\/\/wiki.dovecot.org\/Plugins\/FTS\">nice full text search installed by default<\/a>.\u00a0 Or at least I thought it was nice.\u00a0 It couldn&#8217;t be worse than no full text indexing at all, I figured.<\/p>\n<p>However, my hosting provider didn&#8217;t provide that plugin&#8211;whoops!\u00a0 I downloaded the same version of dovecot, ran &#8216;configure; make; make dist&#8217; and copied over all the fts *.a *.so and *.la files for both fts and fts_squat to the plugin directory.\u00a0 Then I enabled the fts plugin in the dovecot.conf file, <a href=\"http:\/\/wiki.dovecot.org\/Plugins\/FTS\/Squat\">including changes recommended for fts_squat<\/a>, and restarted dovecot.\u00a0 My full text searches (in Thunderbird quick search) for folders with 6000 messages, went from 4.5 seconds to 1 second.\u00a0 Quite the success.<\/p>\n<p>I then wanted to figure out some way to search for multiple areas in the quick search box.\u00a0 I already found that you can use the <a href=\"\/wordpress\/archives\/000400\">pipe symbol as an or operator<\/a> but that only applies to a given type of search (for subject, or body, etc).\u00a0 What I was looking for was a way to search for &#8216;from sue&#8217; &#8216;to anton&#8217; and &#8216;body contains spaghetti&#8217;, all in one search.<\/p>\n<p>I searched and searched, looking at the <a href=\"http:\/\/james.apache.org\/server\/rfclist\/imap4\/rfc2060.txt\">IMAP rfc<\/a> and trying many different variations.\u00a0 I looked at plugins.\u00a0 I looked through the config editor.\u00a0 I tried the <a href=\"http:\/\/www.mozilla.org\/support\/thunderbird\/tips\">Thunderbird tips page<\/a>.\u00a0 No luck.<\/p>\n<p>Then I read a post that talked about the two ways to search.\u00a0 Quick search (the box in the upper right hand corner of the email client) and normal old search, the one you get to by typing &#8216;control-shift-f.<\/p>\n<p>This does exactly what I want!\u00a0 But it&#8217;s cumbersome.\u00a0 It&#8217;d be great to take a <a href=\"http:\/\/www.ymailblog.com\/blog\/search-shortcuts\/\">page from Yahoo Mail and implement their search shortcuts<\/a> in the quick search bar: &#8216;from: &#8216; for from, etc.\u00a0 It&#8217;s a killer feature for me.<\/p>\n<p>Anyone know of a plugin that does this?\u00a0 <a href=\"http:\/\/www.mozilla.org\/support\/thunderbird\/keyboard\">This page has some keyboard shortcuts<\/a>, but that&#8217;s not really what I&#8217;m looking for.\u00a0 And I didn&#8217;t see anything in the <a href=\"https:\/\/bugzilla.mozilla.org\/buglist.cgi?&#038;product=Thunderbird&#038;bug_status=UNCONFIRMED&#038;bug_status=NEW&#038;bug_status=ASSIGNED&#038;bug_status=REOPENED&#038;bug_status=RESOLVED&#038;resolution=WONTFIX&#038;resolution=---\">Thunderbird bug list<\/a>, though <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=349085\">this bug seems like it might be heading down that path<\/a>.<\/p>\n<p>Anyway, those are my recent adventures in email.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I like the Thunderbird email client a lot (Thunderbird2).\u00a0 I used to use and love pine, though, so perhaps you should take any accolades with a grain of salt. I [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-512","post","type-post","status-publish","format-standard","hentry","category-thunderbird"],"_links":{"self":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/comments?post=512"}],"version-history":[{"count":0,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/512\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/media?parent=512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/categories?post=512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/tags?post=512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}