nmzmail
=======

nmzmail is a tool to use the [namazu2](http://www.namazu.org) search engine from
within [mutt](http://www.mutt.org) to search mail stored in maildir folders.
Based on the result of the namazu query, nmzmail generates a maildir folder 
containing symbolic links to the mails matching the query. A simple mutt 
macro makes easy to use nmzmail from within mutt.

Requirements
------------
* mutt (or perhaps another maildir capable mail reader)
* namazu2
* mail stored in maildir format
* libreadline

Usage
-----
* install namazu2 and mutt
* unpack nmzmail tar ball and call ./configure; make; make install
* generate the index using "nmzmail -i <maildir1>  <maildir2> ..."
  where <maildir[12]> are directories that contain maildir folders that should
  be searched. By default the index and the result folder will be generated in
  $HOME/.nmzmail
* add the following macro to your muttrc file:
	macro generic S "<shell-escape>nmzmail<return><esc>c~/.nmzmail/result<return>" "Search via nmzmail"

* run mutt and hit "S", and enter your query when prompted.
* update your index from time to time or regularly via a cron job with 
	nmzmail -i <maildir1> <maildir2> ...

Features
--------
* fast mail searching even with large number of mails; I use it currently 
  on about 25000 mails
* incremental index building
* [rich query language](http://search.namazu.org/)
* integrates nicely into mutt

Example Queries
---------------
* +from:hofmann mutt
  searches for mail containg "hofmann" in From-line and mutt anywhere
* /[Hh]allo|[Hh]ello/
  returns almost all mails in my folders :-)
* "Hi there"
  returns only mails literally containing the string "Hi there".

see the [namazu2 documentation](http://search.namazu.org/) for more
information on the namazu2 query language.
