gnus: What nnmairix does
8.2.3 What nnmairix does
------------------------
The back end ‘nnmairix’ enables you to call mairix from within Gnus,
either to query mairix with a search term or to update the database.
While visiting a message in the summary buffer, you can use several
pre-defined shortcuts for calling mairix, e.g., to quickly search for
all mails from the sender of the current message or to display the whole
thread associated with the message, even if the mails are in different
folders.
Additionally, you can create permanent ‘nnmairix’ groups which are
bound to certain mairix searches. This way, you can easily create a
group containing mails from a certain sender, with a certain subject
line or even for one specific thread based on the Message-ID. If you
check for new mail in these folders (e.g., by pressing ‘g’ or ‘M-g’),
they automatically update themselves by calling mairix.
You might ask why you need ‘nnmairix’ at all, since mairix already
creates the group, populates it with links to the mails so that you can
then access it with Gnus, right? Well, this _might_ work, but often
does not—at least not without problems. Most probably you will get
strange article counts, and sometimes you might see mails which Gnus
claims have already been canceled and are inaccessible. This is due to
the fact that Gnus isn’t really amused when things are happening behind
its back. Another problem can be the mail back end itself, e.g., if you
use mairix with an IMAP server (I had Dovecot complaining about corrupt
index files when mairix changed the contents of the search group).
Using ‘nnmairix’ should circumvent these problems.
‘nnmairix’ is not really a mail back end—it’s actually more like a
wrapper, sitting between a “real” mail back end where mairix stores the
searches and the Gnus front end. You can choose between three different
mail back ends for the mairix folders: ‘nnml’, ‘nnmaildir’ or ‘nnimap’.
‘nnmairix’ will call the mairix binary so that the search results are
stored in folders named ‘zz_mairix-<NAME>-<NUMBER>’ on this mail back
end, but it will present these folders in the Gnus front end only with
‘<NAME>’. You can use an existing mail back end where you already store
your mail, but if you’re uncomfortable with ‘nnmairix’ creating new mail
groups alongside your other mail, you can also create, e.g., a new
‘nnmaildir’ or ‘nnml’ server exclusively for mairix, but then make sure
those servers do not accidentally receive your new mail (nnmairix
caveats). A special case exists if you want to use mairix remotely on
an IMAP server with ‘nnimap’—here the mairix folders and your other mail
must be on the same ‘nnimap’ back end.