https://github.com/rc0/mairix [ 1 ]
An index program for Maildir, MH and mbox folders.
Recommended for Claws Mail: https://www.claws-mail.org/faq/index.php/Using_Sylpheed-Claws_with_other_programs#How_can_I_use_Claws_Mail_with_mairix.3F
2009-06-13 ∞
I just grabbed the source and compiled it. The usual crap..
apt-get install bison flex ./configure make
but my busted-ass system still won’t work..
output
make[1]: Entering directory `/path/to/mairix-0.21/dfasyn' gcc -O2 -Wall -DHAS_STDINT_H -DHAS_INTTYPES_H -DUSE_GZIP_MBOX -DUSE_BZIP_MBOX -o dfasyn dfasyn.o parse.o scan.o tokens.o abbrevs.o charclass.o stimulus.o blocks.o states.o n2d.o expr.o evaluator.o tabcompr.o compdfa.o dfasyn.o: In function `main': dfasyn.c:(.text+0x475): undefined reference to `yyin' dfasyn.c:(.text+0x47a): undefined reference to `yyout' parse.o: In function `yyparse': parse.c:(.text+0x3fb): undefined reference to `yylex' n2d.o: In function `yyerror': n2d.c:(.text+0xf7): undefined reference to `lineno' collect2: ld returned 1 exit status make[1]: *** [dfasyn] Error 1 make[1]: Leaving directory `/path/to/mairix-0.21/dfasyn' make: *** [dfasyn/dfasyn] Error 2 [1] 32327 exit 2 make
Usage ∞
with Claws Mail ∞
source unknown
In addition to the quicksearch, that allows filtering out messages in folders recursively, you can use mairix in Claws Mail in order to perform message searches across a wide range of folders.
To illustrate this topic, we’ll detail the necessary steps to make a global search in a MH config (in our example, ~/Mail).
- install mairix from rpcurnow.force9.co.uk/mairix/ or get it from your packages repository. mairix is a program for indexing and searching email messages stored in Maildir, MH or mbox folders. We recommend to avoid using version 0.20 (0.17 to 0.19 are fine).
- create a folder in Claws Mail where the search results will be stored in (in our example:
~/Mail/Search). -
create a mairix config file (
~/.mairixrcfor instance):
base=~/Mail mh=*... omit=draft:queue:trash:Junk:Search database=~/.mairix_db mfolder=Search mformat=mh
in that example, the base directory is ~/Mail, the search will be performed across all folders and sub-folders (mh=*…) in the base directory. Search will omit drafts, queue, trash, Junk and Search folders located in the base directory, and will place results into the Search folder. If you’re in the search folder prior to starting the search, you’ll have to select click “View/Update summary” to refresh the messages list.
See man mairix for more information about the mairix configuration file.
-
add an action in Claws Mail to start the mairix search:
~/.claws-mail/tools/mairix.sh ~/.mairixrc
make sure that you’ve installed mairix.sh from the Tools pages ( https://www.claws-mail.org/tools/claws-mail-mairix.tar.gz) into ~/.claws-mail/tools or wherever you want, provided that you set the correct path in the action text.
Now call the action. You’ll be asked for the text to search for. Search results – symlinks to the existing message files, will be placed into the target folder, making it like a virtual folder. Removing messages from that folder will NOT remove the original message files. The text to search for is an expression to pass to mairix. See man mairix for all search patterns.
You can create as many mairix config files as you want (be sure that you set a different database value in each of them), then create the corresponding actions that call mairix.sh with the config filename in parameter.

ported