{"id":440,"date":"2021-12-30T19:59:04","date_gmt":"2021-12-30T09:59:04","guid":{"rendered":"https:\/\/www.ubermotive.com\/?p=440"},"modified":"2021-12-30T20:02:18","modified_gmt":"2021-12-30T10:02:18","slug":"adding-full-text-search-fts-to-dovecot-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/www.ubermotive.com\/?p=440","title":{"rendered":"Adding Full Text Search (FTS) to Dovecot on Ubuntu 20.04"},"content":{"rendered":"\n<p>A full text search (FTS) will greatly improve the speed IMAP search commands. In particular, the Android GMail client will be able to search your inbox with lightning speed. This solution is lightweight and easy enough to set up. I&#8217;m assuming you have a working dovecot install at this point.<\/p>\n\n\n\n<p>First, install the dovecot-lucene plugin. Unlike Solr, this won&#8217;t install any bloat such as tomcat or java.<\/p>\n\n\n\n<p>$ <code>sudo apt install dovecot-lucene<\/code><\/p>\n\n\n\n<p>Then enable the plugin by adding it to <code>\/etc\/dovecot\/conf.d\/10-mail.conf<\/code>. Uncomment the <code>mail_plugins<\/code> line, and change it to:<\/p>\n\n\n\n<p><code>mail_plugins = fts fts_lucene<\/code><\/p>\n\n\n\n<p>Then modify <code>\/etc\/dovecot\/conf.d\/90-plugin.conf<\/code> to configure the plugin:<\/p>\n\n\n\n<p><code>plugin {<br>  #setting_name = value<br>  fts = lucene<br>  fts_lucene = whitespace_chars=@. normalize no_snowball<br>  fts_autoindex=yes<br>  fts_autoindex_max_recent_msgs=80<br>  fts_index_timeout=90<br>}<\/code><\/p>\n\n\n\n<p>Restart the dovecot service to apply all of the changes:<\/p>\n\n\n\n<p>$ <code>sudo service dovecot restart<\/code><\/p>\n\n\n\n<p>To start indexing mail, run the following command as root:<\/p>\n\n\n\n<p><code># doveadm -v index -u '*<em>' '<\/em>*'<\/code><br><br>The base guide I used is <a rel=\"noreferrer noopener\" href=\"https:\/\/www.howtoforge.com\/community\/threads\/dovecot-with-fts-lucene.76812\/\" target=\"_blank\">here<\/a>, but I&#8217;ve adapted it for Ubuntu.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A full text search (FTS) will greatly improve the speed IMAP search commands. In particular, the Android GMail client will be able to search your inbox with lightning speed. This solution is lightweight and easy enough to set up. I&#8217;m assuming you have a working dovecot install at this point. First, install the dovecot-lucene plugin. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-440","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.ubermotive.com\/index.php?rest_route=\/wp\/v2\/posts\/440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ubermotive.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ubermotive.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ubermotive.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ubermotive.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=440"}],"version-history":[{"count":2,"href":"https:\/\/www.ubermotive.com\/index.php?rest_route=\/wp\/v2\/posts\/440\/revisions"}],"predecessor-version":[{"id":442,"href":"https:\/\/www.ubermotive.com\/index.php?rest_route=\/wp\/v2\/posts\/440\/revisions\/442"}],"wp:attachment":[{"href":"https:\/\/www.ubermotive.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ubermotive.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ubermotive.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}