haqistan / mail-query

Query a maildir's contents and print From info for use as a mutt query_command

Repository from Github https://github.comhaqistan/mail-queryRepository from Github https://github.comhaqistan/mail-query

Mail Query

Archived: I don't use or maintain this project anymore. Forks welcome.

Query the contents of a Maildir (e.g. ~/Mail/INBOX), for From: addresses. Print these addresses in the format expected by mutt as a query_command, similar to abook --mutt-query foo.

Installation

make
sudo make install

A PKGBUILD is present for Arch users.

Usage

Assuming your Maildir is at ~/Mail/INBOX, add to your muttrc:

set query_command = "mail-query '%s' ~/Mail/INBOX"

To decode 7-bit ASCII encoded MIME-headers (starting, for example, with =?UTF-8? or =?ISO-8859-1?), ensure that perl is executable and the Encode::MIME:Header module is installed, then replace the above line in your muttrc by:

set query_command= "mail-query '%s' ~/Mail/INBOX | perl -CS -MEncode -ne 'print decode(\"MIME-Header\", $_)'"

Extensions

The plug-in vim-mailquery lets you complete e-mail addresses inside vim via mail-query.

About

Query a maildir's contents and print From info for use as a mutt query_command


Languages

Language:C 87.3%Language:Shell 7.4%Language:Makefile 5.3%