Mairix is a tool for indexing and searching words in locally stored mail. It was written by Richard Curnow and is licensed under the GPL. Mairix comes with most popular GNU/Linux distributions, but it also runs under Windows (with cygwin), macOS and Solaris. The website can be found at http://www.rpcurnow.force9.co.uk/mairix/index.html
Though mairix might not be as flexible as other search tools like swish++ or namazu, it has the prime advantage of being incredibly fast. On current systems, it can easily search through headers and message bodies of thousands and thousands of mails in well under a second. Building the database necessary for searching might take a minute or two, but only has to be done once fully. Afterwards, the updates are done incrementally and therefore are really fast, too. Additionally, mairix is very easy to set up.
For maximum speed though, mairix should be used with mails stored in
Maildir
or MH
format (this includes the nnml
back
end), although it also works with mbox. Mairix presents the search
results by populating a virtual maildir/MH folder with symlinks
which point to the “real” message files (if mbox is used, copies are
made). Since mairix already presents search results in such a virtual
mail folder, it is very well suited for using it as an external program
for creating smart mail folders, which represent certain mail
searches.