aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/misc/ChangeLog4
-rw-r--r--doc/misc/gnus.texi1756
2 files changed, 1053 insertions, 707 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 68895409743..c26b3872c03 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,7 @@
12010-12-13 Andrew Cohen <cohen@andy.bu.edu>
2
3 * gnus.texi: First pass at adding (rough) nnir documentation.
4
12010-12-13 Lars Magne Ingebrigtsen <larsi@gnus.org> 52010-12-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 6
3 * gnus.texi (Filtering New Groups): Mention 7 * gnus.texi (Filtering New Groups): Mention
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 3ddfb1a6448..d413d13d65a 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -407,6 +407,7 @@ This manual corresponds to Gnus v5.13
407* Composing Messages:: Information on sending mail and news. 407* Composing Messages:: Information on sending mail and news.
408* Select Methods:: Gnus reads all messages from various select methods. 408* Select Methods:: Gnus reads all messages from various select methods.
409* Scoring:: Assigning values to articles. 409* Scoring:: Assigning values to articles.
410* Searching:: Mail and News search engines.
410* Various:: General purpose settings. 411* Various:: General purpose settings.
411* The End:: Farewell and goodbye. 412* The End:: Farewell and goodbye.
412* Appendices:: Terminology, Emacs intro, @acronym{FAQ}, History, Internals. 413* Appendices:: Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
@@ -785,6 +786,21 @@ Advanced Scoring
785* Advanced Scoring Examples:: What they look like. 786* Advanced Scoring Examples:: What they look like.
786* Advanced Scoring Tips:: Getting the most out of it. 787* Advanced Scoring Tips:: Getting the most out of it.
787 788
789Searching
790
791* nnir:: Searching with various engines.
792* nnmairix:: Searching with Mairix.
793
794nnir
795
796* What is nnir:: What does nnir do.
797* Basic Usage:: How to perform simple searches.
798* Setting up nnir:: How to set up nnir.
799
800Setting up nnir
801
802* Associating Engines:: How to associate engines.
803
788Various 804Various
789 805
790* Process/Prefix:: A convention used by many treatment commands. 806* Process/Prefix:: A convention used by many treatment commands.
@@ -1660,7 +1676,6 @@ long as Gnus is active.
1660* Exiting Gnus:: Stop reading news and get some work done. 1676* Exiting Gnus:: Stop reading news and get some work done.
1661* Group Topics:: A folding group mode divided into topics. 1677* Group Topics:: A folding group mode divided into topics.
1662* Non-ASCII Group Names:: Accessing groups of non-English names. 1678* Non-ASCII Group Names:: Accessing groups of non-English names.
1663* Searching:: Mail search engines.
1664* Misc Group Stuff:: Other stuff that you can to do. 1679* Misc Group Stuff:: Other stuff that you can to do.
1665@end menu 1680@end menu
1666 1681
@@ -4282,712 +4297,6 @@ names should be the same in both groups. Otherwise the Newsgroups
4282header will be displayed incorrectly in the article buffer. 4297header will be displayed incorrectly in the article buffer.
4283 4298
4284 4299
4285@node Searching
4286@section Searching
4287
4288@menu
4289* nnir:: Searching on IMAP, with swish, namazu, etc.
4290* nnmairix:: Searching maildir, MH or mbox with Mairix.
4291@end menu
4292
4293@cindex Searching
4294
4295FIXME: This node is a stub.
4296
4297FIXME: Add a brief overview of Gnus search capabilities. A brief
4298comparison of nnir, nnmairix, contrib/gnus-namazu would be nice
4299as well.
4300
4301FIXME: Explain difference to @ref{Searching for Articles}, add reference
4302and back-reference.
4303
4304@node nnir
4305@subsection nnir
4306
4307FIXME: As a first step, convert the commentary of @file{nnir} to texi.
4308@cindex nnir
4309
4310@node nnmairix
4311@subsection nnmairix
4312
4313@cindex mairix
4314@cindex nnmairix
4315This paragraph describes how to set up mairix and the back end
4316@code{nnmairix} for indexing and searching your mail from within
4317Gnus. Additionally, you can create permanent ``smart'' groups which are
4318bound to mairix searches and are automatically updated.
4319
4320@menu
4321* About mairix:: About the mairix mail search engine
4322* nnmairix requirements:: What you will need for using nnmairix
4323* What nnmairix does:: What does nnmairix actually do?
4324* Setting up mairix:: Set up your mairix installation
4325* Configuring nnmairix:: Set up the nnmairix back end
4326* nnmairix keyboard shortcuts:: List of available keyboard shortcuts
4327* Propagating marks:: How to propagate marks from nnmairix groups
4328* nnmairix tips and tricks:: Some tips, tricks and examples
4329* nnmairix caveats:: Some more stuff you might want to know
4330@end menu
4331
4332@c FIXME: The markup in this section might need improvement.
4333@c E.g. adding @samp, @var, @file, @command, etc.
4334@c Cf. (info "(texinfo)Indicating")
4335
4336@node About mairix
4337@subsubsection About mairix
4338
4339Mairix is a tool for indexing and searching words in locally stored
4340mail. It was written by Richard Curnow and is licensed under the
4341GPL. Mairix comes with most popular GNU/Linux distributions, but it also
4342runs under Windows (with cygwin), Mac OS X and Solaris. The homepage can
4343be found at
4344@uref{http://www.rpcurnow.force9.co.uk/mairix/index.html}
4345
4346Though mairix might not be as flexible as other search tools like
4347swish++ or namazu, which you can use via the @code{nnir} back end, it
4348has the prime advantage of being incredibly fast. On current systems, it
4349can easily search through headers and message bodies of thousands and
4350thousands of mails in well under a second. Building the database
4351necessary for searching might take a minute or two, but only has to be
4352done once fully. Afterwards, the updates are done incrementally and
4353therefore are really fast, too. Additionally, mairix is very easy to set
4354up.
4355
4356For maximum speed though, mairix should be used with mails stored in
4357@code{Maildir} or @code{MH} format (this includes the @code{nnml} back
4358end), although it also works with mbox. Mairix presents the search
4359results by populating a @emph{virtual} maildir/MH folder with symlinks
4360which point to the ``real'' message files (if mbox is used, copies are
4361made). Since mairix already presents search results in such a virtual
4362mail folder, it is very well suited for using it as an external program
4363for creating @emph{smart} mail folders, which represent certain mail
4364searches.
4365
4366@node nnmairix requirements
4367@subsubsection nnmairix requirements
4368
4369Mairix searches local mail---that means, mairix absolutely must have
4370direct access to your mail folders. If your mail resides on another
4371server (e.g. an @acronym{IMAP} server) and you happen to have shell
4372access, @code{nnmairix} supports running mairix remotely, e.g. via ssh.
4373
4374Additionally, @code{nnmairix} only supports the following Gnus back
4375ends: @code{nnml}, @code{nnmaildir}, and @code{nnimap}. You must use
4376one of these back ends for using @code{nnmairix}. Other back ends, like
4377@code{nnmbox}, @code{nnfolder} or @code{nnmh}, won't work.
4378
4379If you absolutely must use mbox and still want to use @code{nnmairix},
4380you can set up a local @acronym{IMAP} server, which you then access via
4381@code{nnimap}. This is a rather massive setup for accessing some mbox
4382files, so just change to MH or Maildir already... However, if you're
4383really, really passionate about using mbox, you might want to look into
4384the package @file{mairix.el}, which comes with Emacs 23.
4385
4386@node What nnmairix does
4387@subsubsection What nnmairix does
4388
4389The back end @code{nnmairix} enables you to call mairix from within Gnus,
4390either to query mairix with a search term or to update the
4391database. While visiting a message in the summary buffer, you can use
4392several pre-defined shortcuts for calling mairix, e.g. to quickly
4393search for all mails from the sender of the current message or to
4394display the whole thread associated with the message, even if the
4395mails are in different folders.
4396
4397Additionally, you can create permanent @code{nnmairix} groups which are bound
4398to certain mairix searches. This way, you can easily create a group
4399containing mails from a certain sender, with a certain subject line or
4400even for one specific thread based on the Message-ID. If you check for
4401new mail in these folders (e.g. by pressing @kbd{g} or @kbd{M-g}), they
4402automatically update themselves by calling mairix.
4403
4404You might ask why you need @code{nnmairix} at all, since mairix already
4405creates the group, populates it with links to the mails so that you can
4406then access it with Gnus, right? Well, this @emph{might} work, but often
4407does not---at least not without problems. Most probably you will get
4408strange article counts, and sometimes you might see mails which Gnus
4409claims have already been canceled and are inaccessible. This is due to
4410the fact that Gnus isn't really amused when things are happening behind
4411its back. Another problem can be the mail back end itself, e.g. if you
4412use mairix with an @acronym{IMAP} server (I had Dovecot complaining
4413about corrupt index files when mairix changed the contents of the search
4414group). Using @code{nnmairix} should circumvent these problems.
4415
4416@code{nnmairix} is not really a mail back end---it's actually more like
4417a wrapper, sitting between a ``real'' mail back end where mairix stores
4418the searches and the Gnus front end. You can choose between three
4419different mail back ends for the mairix folders: @code{nnml},
4420@code{nnmaildir} or @code{nnimap}. @code{nnmairix} will call the mairix
4421binary so that the search results are stored in folders named
4422@code{zz_mairix-<NAME>-<NUMBER>} on this mail back end, but it will
4423present these folders in the Gnus front end only with @code{<NAME>}.
4424You can use an existing mail back end where you already store your mail,
4425but if you're uncomfortable with @code{nnmairix} creating new mail
4426groups alongside your other mail, you can also create e.g. a new
4427@code{nnmaildir} or @code{nnml} server exclusively for mairix, but then
4428make sure those servers do not accidentally receive your new mail
4429(@pxref{nnmairix caveats}). A special case exists if you want to use
4430mairix remotely on an IMAP server with @code{nnimap}---here the mairix
4431folders and your other mail must be on the same @code{nnimap} back end.
4432
4433@node Setting up mairix
4434@subsubsection Setting up mairix
4435
4436First: create a backup of your mail folders (@pxref{nnmairix caveats}).
4437
4438Setting up mairix is easy: simply create a @file{.mairixrc} file with
4439(at least) the following entries:
4440
4441@example
4442# Your Maildir/MH base folder
4443base=~/Maildir
4444@end example
4445
4446This is the base folder for your mails. All the following directories
4447are relative to this base folder. If you want to use @code{nnmairix}
4448with @code{nnimap}, this base directory has to point to the mail
4449directory where the @acronym{IMAP} server stores the mail folders!
4450
4451@example
4452maildir= ... your maildir folders which should be indexed ...
4453mh= ... your nnml/mh folders which should be indexed ...
4454mbox = ... your mbox files which should be indexed ...
4455@end example
4456
4457This specifies all your mail folders and mbox files (relative to the
4458base directory!) you want to index with mairix. Note that the
4459@code{nnml} back end saves mails in MH format, so you have to put those
4460directories in the @code{mh} line. See the example at the end of this
4461section and mairixrc's man-page for further details.
4462
4463@example
4464omit=zz_mairix-*
4465@end example
4466
4467@vindex nnmairix-group-prefix
4468This should make sure that you don't accidentally index the mairix
4469search results. You can change the prefix of these folders with the
4470variable @code{nnmairix-group-prefix}.
4471
4472@example
4473mformat= ... 'maildir' or 'mh' ...
4474database= ... location of database file ...
4475@end example
4476
4477The @code{format} setting specifies the output format for the mairix
4478search folder. Set this to @code{mh} if you want to access search results
4479with @code{nnml}. Otherwise choose @code{maildir}.
4480
4481To summarize, here is my shortened @file{.mairixrc} file as an example:
4482
4483@example
4484base=~/Maildir
4485maildir=.personal:.work:.logcheck:.sent
4486mh=../Mail/nnml/*...
4487mbox=../mboxmail/mailarchive_year*
4488mformat=maildir
4489omit=zz_mairix-*
4490database=~/.mairixdatabase
4491@end example
4492
4493In this case, the base directory is @file{~/Maildir}, where all my Maildir
4494folders are stored. As you can see, the folders are separated by
4495colons. If you wonder why every folder begins with a dot: this is
4496because I use Dovecot as @acronym{IMAP} server, which again uses
4497@code{Maildir++} folders. For testing nnmairix, I also have some
4498@code{nnml} mail, which is saved in @file{~/Mail/nnml}. Since this has
4499to be specified relative to the @code{base} directory, the @code{../Mail}
4500notation is needed. Note that the line ends in @code{*...}, which means
4501to recursively scan all files under this directory. Without the three
4502dots, the wildcard @code{*} will not work recursively. I also have some
4503old mbox files with archived mail lying around in @file{~/mboxmail}.
4504The other lines should be obvious.
4505
4506See the man page for @code{mairixrc} for details and further options,
4507especially regarding wildcard usage, which may be a little different
4508than you are used to.
4509
4510Now simply call @code{mairix} to create the index for the first time.
4511Note that this may take a few minutes, but every following index will do
4512the updates incrementally and hence is very fast.
4513
4514@node Configuring nnmairix
4515@subsubsection Configuring nnmairix
4516
4517In group mode, type @kbd{G b c}
4518(@code{nnmairix-create-server-and-default-group}). This will ask you for all
4519necessary information and create a @code{nnmairix} server as a foreign
4520server. You will have to specify the following:
4521
4522@itemize @bullet
4523
4524@item
4525The @strong{name} of the @code{nnmairix} server---choose whatever you
4526want.
4527
4528@item
4529The name of the @strong{back end server} where mairix should store its
4530searches. This must be a full server name, like @code{nnml:mymail}.
4531Just hit @kbd{TAB} to see the available servers. Currently, servers
4532which are accessed through @code{nnmaildir}, @code{nnimap} and
4533@code{nnml} are supported. As explained above, for locally stored
4534mails, this can be an existing server where you store your mails.
4535However, you can also create e.g. a new @code{nnmaildir} or @code{nnml}
4536server exclusively for @code{nnmairix} in your secondary select methods
4537(@pxref{Finding the News}). If you use a secondary @code{nnml} server
4538just for mairix, make sure that you explicitly set the server variable
4539@code{nnml-get-new-mail} to @code{nil}, or you might lose mail
4540(@pxref{nnmairix caveats}). If you want to use mairix remotely on an
4541@acronym{IMAP} server, you have to choose the corresponding
4542@code{nnimap} server here.
4543
4544@item
4545@vindex nnmairix-mairix-search-options
4546The @strong{command} to call the mairix binary. This will usually just
4547be @code{mairix}, but you can also choose something like @code{ssh
4548SERVER mairix} if you want to call mairix remotely, e.g. on your
4549@acronym{IMAP} server. If you want to add some default options to
4550mairix, you could do this here, but better use the variable
4551@code{nnmairix-mairix-search-options} instead.
4552
4553@item
4554The name of the @strong{default search group}. This will be the group
4555where all temporary mairix searches are stored, i.e. all searches which
4556are not bound to permanent @code{nnmairix} groups. Choose whatever you
4557like.
4558
4559@item
4560If the mail back end is @code{nnimap} or @code{nnmaildir}, you will be
4561asked if you work with @strong{Maildir++}, i.e. with hidden maildir
4562folders (=beginning with a dot). For example, you have to answer
4563@samp{yes} here if you work with the Dovecot @acronym{IMAP}
4564server. Otherwise, you should answer @samp{no} here.
4565
4566@end itemize
4567
4568@node nnmairix keyboard shortcuts
4569@subsubsection nnmairix keyboard shortcuts
4570
4571In group mode:
4572
4573@table @kbd
4574
4575@item G b c
4576@kindex G b c (Group)
4577@findex nnmairix-create-server-and-default-group
4578Creates @code{nnmairix} server and default search group for this server
4579(@code{nnmairix-create-server-and-default-group}). You should have done
4580this by now (@pxref{Configuring nnmairix}).
4581
4582@item G b s
4583@kindex G b s (Group)
4584@findex nnmairix-search
4585Prompts for query which is then sent to the mairix binary. Search
4586results are put into the default search group which is automatically
4587displayed (@code{nnmairix-search}).
4588
4589@item G b m
4590@kindex G b m (Group)
4591@findex nnmairix-widget-search
4592Allows you to create a mairix search or a permanent group more
4593comfortably using graphical widgets, similar to a customization
4594group. Just try it to see how it works (@code{nnmairix-widget-search}).
4595
4596@item G b i
4597@kindex G b i (Group)
4598@findex nnmairix-search-interactive
4599Another command for creating a mairix query more comfortably, but uses
4600only the minibuffer (@code{nnmairix-search-interactive}).
4601
4602@item G b g
4603@kindex G b g (Group)
4604@findex nnmairix-create-search-group
4605Creates a permanent group which is associated with a search query
4606(@code{nnmairix-create-search-group}). The @code{nnmairix} back end
4607automatically calls mairix when you update this group with @kbd{g} or
4608@kbd{M-g}.
4609
4610@item G b q
4611@kindex G b q (Group)
4612@findex nnmairix-group-change-query-this-group
4613Changes the search query for the @code{nnmairix} group under cursor
4614(@code{nnmairix-group-change-query-this-group}).
4615
4616@item G b t
4617@kindex G b t (Group)
4618@findex nnmairix-group-toggle-threads-this-group
4619Toggles the 'threads' parameter for the @code{nnmairix} group under cursor,
4620i.e. if you want see the whole threads of the found messages
4621(@code{nnmairix-group-toggle-threads-this-group}).
4622
4623@item G b u
4624@kindex G b u (Group)
4625@findex nnmairix-update-database
4626@vindex nnmairix-mairix-update-options
4627Calls mairix binary for updating the database
4628(@code{nnmairix-update-database}). The default parameters are @code{-F}
4629and @code{-Q} for making this as fast as possible (see variable
4630@code{nnmairix-mairix-update-options} for defining these default
4631options).
4632
4633@item G b r
4634@kindex G b r (Group)
4635@findex nnmairix-group-toggle-readmarks-this-group
4636Keep articles in this @code{nnmairix} group always read or unread, or leave the
4637marks unchanged (@code{nnmairix-group-toggle-readmarks-this-group}).
4638
4639@item G b d
4640@kindex G b d (Group)
4641@findex nnmairix-group-delete-recreate-this-group
4642Recreate @code{nnmairix} group on the ``real'' mail back end
4643(@code{nnmairix-group-delete-recreate-this-group}). You can do this if
4644you always get wrong article counts with a @code{nnmairix} group.
4645
4646@item G b a
4647@kindex G b a (Group)
4648@findex nnmairix-group-toggle-allowfast-this-group
4649Toggles the @code{allow-fast} parameters for group under cursor
4650(@code{nnmairix-group-toggle-allowfast-this-group}). The default
4651behavior of @code{nnmairix} is to do a mairix search every time you
4652update or enter the group. With the @code{allow-fast} parameter set,
4653mairix will only be called when you explicitly update the group, but not
4654upon entering. This makes entering the group faster, but it may also
4655lead to dangling symlinks if something changed between updating and
4656entering the group which is not yet in the mairix database.
4657
4658@item G b p
4659@kindex G b p (Group)
4660@findex nnmairix-group-toggle-propmarks-this-group
4661Toggle marks propagation for this group
4662(@code{nnmairix-group-toggle-propmarks-this-group}). (@pxref{Propagating
4663marks}).
4664
4665@item G b o
4666@kindex G b o (Group)
4667@findex nnmairix-propagate-marks
4668Manually propagate marks (@code{nnmairix-propagate-marks}); needed only when
4669@code{nnmairix-propagate-marks-upon-close} is set to @code{nil}.
4670
4671@end table
4672
4673In summary mode:
4674
4675@table @kbd
4676
4677@item $ m
4678@kindex $ m (Summary)
4679@findex nnmairix-widget-search-from-this-article
4680Allows you to create a mairix query or group based on the current
4681message using graphical widgets (same as @code{nnmairix-widget-search})
4682(@code{nnmairix-widget-search-from-this-article}).
4683
4684@item $ g
4685@kindex $ g (Summary)
4686@findex nnmairix-create-search-group-from-message
4687Interactively creates a new search group with query based on the current
4688message, but uses the minibuffer instead of graphical widgets
4689(@code{nnmairix-create-search-group-from-message}).
4690
4691@item $ t
4692@kindex $ t (Summary)
4693@findex nnmairix-search-thread-this-article
4694Searches thread for the current article
4695(@code{nnmairix-search-thread-this-article}). This is effectively a
4696shortcut for calling @code{nnmairix-search} with @samp{m:msgid} of the
4697current article and enabled threads.
4698
4699@item $ f
4700@kindex $ f (Summary)
4701@findex nnmairix-search-from-this-article
4702Searches all messages from sender of the current article
4703(@code{nnmairix-search-from-this-article}). This is a shortcut for
4704calling @code{nnmairix-search} with @samp{f:From}.
4705
4706@item $ o
4707@kindex $ o (Summary)
4708@findex nnmairix-goto-original-article
4709(Only in @code{nnmairix} groups!) Tries determine the group this article
4710originally came from and displays the article in this group, so that
4711e.g. replying to this article the correct posting styles/group
4712parameters are applied (@code{nnmairix-goto-original-article}). This
4713function will use the registry if available, but can also parse the
4714article file name as a fallback method.
4715
4716@item $ u
4717@kindex $ u (Summary)
4718@findex nnmairix-remove-tick-mark-original-article
4719Remove possibly existing tick mark from original article
4720(@code{nnmairix-remove-tick-mark-original-article}). (@pxref{nnmairix
4721tips and tricks}).
4722
4723@end table
4724
4725@node Propagating marks
4726@subsubsection Propagating marks
4727
4728First of: you really need a patched mairix binary for using the marks
4729propagation feature efficiently. Otherwise, you would have to update
4730the mairix database all the time. You can get the patch at
4731
4732@uref{http://www.randomsample.de/mairix-maildir-patch.tar}
4733
4734You need the mairix v0.21 source code for this patch; everything else
4735is explained in the accompanied readme file. If you don't want to use
4736marks propagation, you don't have to apply these patches, but they also
4737fix some annoyances regarding changing maildir flags, so it might still
4738be useful to you.
4739
4740With the patched mairix binary, you can use @code{nnmairix} as an
4741alternative to mail splitting (@pxref{Fancy Mail Splitting}). For
4742example, instead of splitting all mails from @samp{david@@foobar.com}
4743into a group, you can simply create a search group with the query
4744@samp{f:david@@foobar.com}. This is actually what ``smart folders'' are
4745all about: simply put everything in one mail folder and dynamically
4746create searches instead of splitting. This is more flexible, since you
4747can dynamically change your folders any time you want to. This also
4748implies that you will usually read your mails in the @code{nnmairix}
4749groups instead of your ``real'' mail groups.
4750
4751There is one problem, though: say you got a new mail from
4752@samp{david@@foobar.com}; it will now show up in two groups, the
4753``real'' group (your INBOX, for example) and in the @code{nnmairix}
4754search group (provided you have updated the mairix database). Now you
4755enter the @code{nnmairix} group and read the mail. The mail will be
4756marked as read, but only in the @code{nnmairix} group---in the ``real''
4757mail group it will be still shown as unread.
4758
4759You could now catch up the mail group (@pxref{Group Data}), but this is
4760tedious and error prone, since you may overlook mails you don't have
4761created @code{nnmairix} groups for. Of course, you could first use
4762@code{nnmairix-goto-original-article} (@pxref{nnmairix keyboard
4763shortcuts}) and then read the mail in the original group, but that's
4764even more cumbersome.
4765
4766Clearly, the easiest way would be if marks could somehow be
4767automatically set for the original article. This is exactly what
4768@emph{marks propagation} is about.
4769
4770Marks propagation is deactivated by default. You can activate it for a
4771certain @code{nnmairix} group with
4772@code{nnmairix-group-toggle-propmarks-this-group} (bound to @kbd{G b
4773p}). This function will warn you if you try to use it with your default
4774search group; the reason is that the default search group is used for
4775temporary searches, and it's easy to accidentally propagate marks from
4776this group. However, you can ignore this warning if you really want to.
4777
4778With marks propagation enabled, all the marks you set in a @code{nnmairix}
4779group should now be propagated to the original article. For example,
4780you can now tick an article (by default with @kbd{!}) and this mark should
4781magically be set for the original article, too.
4782
4783A few more remarks which you may or may not want to know:
4784
4785@vindex nnmairix-propagate-marks-upon-close
4786Marks will not be set immediately, but only upon closing a group. This
4787not only makes marks propagation faster, it also avoids problems with
4788dangling symlinks when dealing with maildir files (since changing flags
4789will change the file name). You can also control when to propagate marks
4790via @code{nnmairix-propagate-marks-upon-close} (see the doc-string for
4791details).
4792
4793Obviously, @code{nnmairix} will have to look up the original group for every
4794article you want to set marks for. If available, @code{nnmairix} will first use
4795the registry for determining the original group. The registry is very
4796fast, hence you should really, really enable the registry when using
4797marks propagation. If you don't have to worry about RAM and disc space,
4798set @code{gnus-registry-max-entries} to a large enough value; to be on
4799the safe side, choose roughly the amount of mails you index with mairix.
4800
4801@vindex nnmairix-only-use-registry
4802If you don't want to use the registry or the registry hasn't seen the
4803original article yet, @code{nnmairix} will use an additional mairix
4804search for determining the file name of the article. This, of course, is
4805way slower than the registry---if you set hundreds or even thousands of
4806marks this way, it might take some time. You can avoid this situation by
4807setting @code{nnmairix-only-use-registry} to t.
4808
4809Maybe you also want to propagate marks the other way round, i.e. if you
4810tick an article in a "real" mail group, you'd like to have the same
4811article in a @code{nnmairix} group ticked, too. For several good
4812reasons, this can only be done efficiently if you use maildir. To
4813immediately contradict myself, let me mention that it WON'T work with
4814@code{nnmaildir}, since @code{nnmaildir} stores the marks externally and
4815not in the file name. Therefore, propagating marks to @code{nnmairix}
4816groups will usually only work if you use an IMAP server which uses
4817maildir as its file format.
4818
4819@vindex nnmairix-propagate-marks-to-nnmairix-groups
4820If you work with this setup, just set
4821@code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t} and see what
4822happens. If you don't like what you see, just set it to @code{nil} again. One
4823problem might be that you get a wrong number of unread articles; this
4824usually happens when you delete or expire articles in the original
4825groups. When this happens, you can recreate the @code{nnmairix} group on the
4826back end using @kbd{G b d}.
4827
4828@node nnmairix tips and tricks
4829@subsubsection nnmairix tips and tricks
4830
4831@itemize
4832@item
4833Checking Mail
4834
4835@findex nnmairix-update-groups
4836I put all my important mail groups at group level 1. The mairix groups
4837have group level 5, so they do not get checked at start up (@pxref{Group
4838Levels}).
4839
4840I use the following to check for mails:
4841
4842@lisp
4843(defun my-check-mail-mairix-update (level)
4844 (interactive "P")
4845 ;; if no prefix given, set level=1
4846 (gnus-group-get-new-news (or level 1))
4847 (nnmairix-update-groups "mairixsearch" t t)
4848 (gnus-group-list-groups))
4849
4850(define-key gnus-group-mode-map "g" 'my-check-mail-mairix-update)
4851@end lisp
4852
4853Instead of @samp{"mairixsearch"} use the name of your @code{nnmairix}
4854server. See the doc string for @code{nnmairix-update-groups} for
4855details.
4856
4857@item
4858Example: search group for ticked articles
4859
4860For example, you can create a group for all ticked articles, where the
4861articles always stay unread:
4862
4863Hit @kbd{G b g}, enter group name (e.g. @samp{important}), use
4864@samp{F:f} as query and do not include threads.
4865
4866Now activate marks propagation for this group by using @kbd{G b p}. Then
4867activate the always-unread feature by using @kbd{G b r} twice.
4868
4869So far so good---but how do you remove the tick marks in the @code{nnmairix}
4870group? There are two options: You may simply use
4871@code{nnmairix-remove-tick-mark-original-article} (bound to @kbd{$ u}) to remove
4872tick marks from the original article. The other possibility is to set
4873@code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t}, but see the above
4874comments about this option. If it works for you, the tick marks should
4875also exist in the @code{nnmairix} group and you can remove them as usual,
4876e.g. by marking an article as read.
4877
4878When you have removed a tick mark from the original article, this
4879article should vanish from the @code{nnmairix} group after you have updated the
4880mairix database and updated the group. Fortunately, there is a function
4881for doing exactly that: @code{nnmairix-update-groups}. See the previous code
4882snippet and the doc string for details.
4883
4884@item
4885Dealing with auto-subscription of mail groups
4886
4887As described before, all @code{nnmairix} groups are in fact stored on
4888the mail back end in the form @samp{zz_mairix-<NAME>-<NUMBER>}. You can
4889see them when you enter the back end server in the server buffer. You
4890should not subscribe these groups! Unfortunately, these groups will
4891usually get @emph{auto-subscribed} when you use @code{nnmaildir} or
4892@code{nnml}, i.e. you will suddenly see groups of the form
4893@samp{zz_mairix*} pop up in your group buffer. If this happens to you,
4894simply kill these groups with C-k. For avoiding this, turn off
4895auto-subscription completely by setting the variable
4896@code{gnus-auto-subscribed-groups} to @code{nil} (@pxref{Filtering New
4897Groups}), or if you like to keep this feature use the following kludge
4898for turning it off for all groups beginning with @samp{zz_}:
4899
4900@lisp
4901(setq gnus-auto-subscribed-groups
4902 "^\\(nnml\\|nnfolder\\|nnmbox\\|nnmh\\|nnbabyl\\|nnmaildir\\).*:\\([^z]\\|z$\\|\\z[^z]\\|zz$\\|zz[^_]\\|zz_$\\).*")
4903@end lisp
4904
4905@end itemize
4906
4907@node nnmairix caveats
4908@subsubsection nnmairix caveats
4909
4910@itemize
4911@item
4912You can create a secondary @code{nnml} server just for nnmairix, but then
4913you have to explicitly set the corresponding server variable
4914@code{nnml-get-new-mail} to @code{nil}. Otherwise, new mail might get
4915put into this secondary server (and would never show up again). Here's
4916an example server definition:
4917
4918@lisp
4919(nnml "mairix" (nnml-directory "mairix") (nnml-get-new-mail nil))
4920@end lisp
4921
4922(The @code{nnmaildir} back end also has a server variabe
4923@code{get-new-mail}, but its default value is @code{nil}, so you don't
4924have to explicitly set it if you use a @code{nnmaildir} server just for
4925mairix.)
4926
4927@item
4928If you use the Gnus registry: don't use the registry with
4929@code{nnmairix} groups (put them in
4930@code{gnus-registry-unfollowed-groups}). Be @emph{extra careful} if
4931you use @code{gnus-registry-split-fancy-with-parent}; mails which are
4932split into @code{nnmairix} groups are usually gone for good as soon as
4933you check the group for new mail (yes, it has happened to me...).
4934
4935@item
4936Therefore: @emph{Never ever} put ``real'' mails into @code{nnmairix}
4937groups (you shouldn't be able to, anyway).
4938
4939@item
4940If you use the Gnus agent (@pxref{Gnus Unplugged}): don't agentize
4941@code{nnmairix} groups (though I have no idea what happens if you do).
4942
4943@item
4944mairix does only support us-ascii characters.
4945
4946@item
4947@code{nnmairix} uses a rather brute force method to force Gnus to
4948completely reread the group on the mail back end after mairix was
4949called---it simply deletes and re-creates the group on the mail
4950back end. So far, this has worked for me without any problems, and I
4951don't see how @code{nnmairix} could delete other mail groups than its
4952own, but anyway: you really should have a backup of your mail
4953folders.
4954
4955@item
4956All necessary information is stored in the group parameters
4957(@pxref{Group Parameters}). This has the advantage that no active file
4958is needed, but also implies that when you kill a @code{nnmairix} group,
4959it is gone for good.
4960
4961@item
4962@findex nnmairix-purge-old-groups
4963If you create and kill a lot of @code{nnmairix} groups, the
4964``zz_mairix-*'' groups will accumulate on the mail back end server. To
4965delete old groups which are no longer needed, call
4966@code{nnmairix-purge-old-groups}. Note that this assumes that you don't
4967save any ``real'' mail in folders of the form
4968@code{zz_mairix-<NAME>-<NUMBER>}. You can change the prefix of
4969@code{nnmairix} groups by changing the variable
4970@code{nnmairix-group-prefix}.
4971
4972@item
4973The following only applies if you @emph{don't} use the mentioned patch
4974for mairix (@pxref{Propagating marks}):
4975
4976A problem can occur when using @code{nnmairix} with maildir folders and
4977comes with the fact that maildir stores mail flags like @samp{Seen} or
4978@samp{Replied} by appending chars @samp{S} and @samp{R} to the message
4979file name, respectively. This implies that currently you would have to
4980update the mairix database not only when new mail arrives, but also when
4981mail flags are changing. The same applies to new mails which are indexed
4982while they are still in the @samp{new} folder but then get moved to
4983@samp{cur} when Gnus has seen the mail. If you don't update the database
4984after this has happened, a mairix query can lead to symlinks pointing to
4985non-existing files. In Gnus, these messages will usually appear with
4986``(none)'' entries in the header and can't be accessed. If this happens
4987to you, using @kbd{G b u} and updating the group will usually fix this.
4988
4989@end itemize
4990
4991@node Misc Group Stuff 4300@node Misc Group Stuff
4992@section Misc Group Stuff 4301@section Misc Group Stuff
4993 4302
@@ -21691,6 +21000,1039 @@ the new score, which should be an integer.
21691Gnus will try to decay scores once a day. If you haven't run Gnus for 21000Gnus will try to decay scores once a day. If you haven't run Gnus for
21692four days, Gnus will decay the scores four times, for instance. 21001four days, Gnus will decay the scores four times, for instance.
21693 21002
21003@node Searching
21004@chapter Searching
21005@cindex searching
21006
21007FIXME: Add a brief overview of Gnus search capabilities. A brief
21008comparison of nnir, nnmairix, contrib/gnus-namazu would be nice
21009as well.
21010
21011This chapter describes tools for searching groups and servers for
21012articles matching a query and then retrieving those articles. Gnus
21013provides a simpler mechanism for searching through articles in a summary buffer
21014to find those matching a pattern. @xref{Searching for Articles}.
21015
21016@menu
21017* nnir:: Searching with various engines.
21018* nnmairix:: Searching with Mairix.
21019@end menu
21020
21021@node nnir
21022@section nnir
21023@cindex nnir
21024
21025This section describes how to use @code{nnir} to search for articles
21026within gnus.
21027
21028@menu
21029* What is nnir:: What does nnir do?
21030* Basic Usage:: How to perform simple searches.
21031* Setting up nnir:: How to set up nnir.
21032@end menu
21033
21034@node What is nnir
21035@subsection What is nnir
21036
21037@code{nnir} is a gnus interface to a number of tools for searching
21038through mail and news repositories. Different backends (like
21039@code{nnimap} and @code{nntp}) work with different tools (called
21040@dfn{engines} in nnir lingo), but all use the same basic search
21041interface.
21042
21043The @code{nnimap} and @code{gmane} search engines should work with no
21044configuration. Other engines require a local index that needs to be
21045created and maintained outside of Gnus.
21046
21047@node Basic Usage
21048@subsection Basic Usage
21049
21050In the group buffer typing @kbd{G G} will search the group on the
21051current line by calling @code{gnus-group-make-nnir-group}. This prompts
21052for a query string, creates an ephemeral @code{nnir} group containing
21053the articles that match this query, and takes you to a summary buffer
21054showing these articles. Articles may then be read, moved and deleted
21055using the usual commands.
21056
21057The @code{nnir} group made in this way is an @code{ephemeral} group, and
21058some changes are not permanent: aside from reading, moving, and
21059deleting, you can't act on the original article. But there is an
21060alternative: you can @emph{warp} to the original group for the article
21061on the current line with @kbd{A W}, aka
21062@code{gnus-warp-to-article}. Even better, the function
21063@code{gnus-summary-refer-thread}, bound by default in summary buffers to
21064@kbd{A T}, will first warp to the original group before it works its
21065magic and includes all the articles in the thread. From here you can
21066read, move and delete articles, but also copy them, alter article marks,
21067whatever. Go nuts.
21068
21069You say you want to search more than just the group on the current line?
21070No problem: just process-mark the groups you want to search. You want
21071even more? Calling for an nnir search with the cursor on a topic heading
21072will search all the groups under that heading.
21073
21074Still not enough? OK, in the server buffer
21075@code{gnus-group-make-nnir-group} (now bound to @kbd{G}) will search all
21076groups from the server on the current line. Too much? Want to ignore
21077certain groups when searching, like spam groups? Just customize
21078@code{nnir-ignored-newsgroups}.
21079
21080One more thing: individual search engines may have special search
21081features. You can access these special features by giving a prefix-arg
21082to @code{gnus-group-make-nnir-group}. If you are searching multiple
21083groups with different search engines you will be prompted for the
21084special search features for each engine separately.
21085
21086@node Setting up nnir
21087@subsection Setting up nnir
21088
21089To set up nnir you may need to do some prep work. Firstly, you may need
21090to configure the search engines you plan to use. Some of them, like
21091@code{imap} and @code{gmane}, need no special configuration. Others,
21092like @code{namazu} and @code{swish}, require configuration as described
21093below. Secondly, you need to associate a search engine with a server or
21094a backend.
21095
21096If you just want to use the @code{imap} engine to search @code{nnimap}
21097servers, and the @code{gmane} engine to search @code{gmane} then you
21098don't have to do anything. But you might want to read the details of the
21099query language anyway.
21100
21101@menu
21102* Associating Engines:: How to associate engines.
21103* The imap Engine:: Imap configuration and usage.
21104* The gmane Engine:: Gmane configuration and usage.
21105* The swish++ Engine:: Swish++ configuration and usage.
21106* The swish-e Engine:: Swish-e configuration and usage.
21107* The namazu Engine:: Namazu configuration and usage.
21108* The hyrex Engine:: Hyrex configuration and usage.
21109* Customizations:: User customizable settings.
21110@end menu
21111
21112@node Associating Engines
21113@subsubsection Associating Engines
21114
21115
21116When searching a group, @code{nnir} needs to know which search engine to
21117use. You can configure a given server to use a particular engine by
21118setting the server variable @code{nnir-search-engine} to the engine
21119name. For example to use the @code{namazu} engine to search the server
21120named @code{home} you can use
21121
21122@lisp
21123(setq gnus-secondary-select-methods '(
21124 (nnml "home"
21125 (nnimap-address "localhost")
21126 (nnir-search-engine namazu))))
21127@end lisp
21128
21129Alternatively you might want to use a particular engine for all servers
21130with a given backend. For example, you might want to use the @code{imap}
21131engine for all servers using the @code{nnimap} backend. In this case you
21132can customize the variable @code{nnir-method-default-engines}. This is
21133an alist of pairs of the form @code{(backend . engine)}. By default this
21134variable is set to use the @code{imap} engine for all servers using the
21135@code{nnimap} backend, and the @code{gmane} backend for @code{nntp}
21136servers. (Don't worry, the @code{gmane} search engine won't actually try
21137to search non-gmane @code{nntp} servers.) But if you wanted to use
21138@code{namazu} for all your servers with an @code{nnimap} backend you
21139could change this to
21140
21141@lisp
21142'((nnimap . namazu)
21143 (nntp . gmane))
21144@end lisp
21145
21146@node The imap Engine
21147@subsubsection The imap Engine
21148
21149The @code{imap} engine requires no configuration.
21150
21151Queries using the @code{imap} engine follow a simple query language.
21152The search is always case-insensitive and supports the following
21153features (inspired by the Google search input language):
21154
21155@table @samp
21156
21157@item Boolean query operators
21158AND, OR, and NOT are supported, and parentheses can be used to control
21159operator precedence, e.g. (emacs OR xemacs) AND linux. Note that
21160operators must be written with all capital letters to be
21161recognised. Also preceding a term with a - sign is equivalent to NOT
21162term.
21163
21164@item Automatic AND queries
21165If you specify multiple words then they will be treated as an AND
21166expression intended to match all components.
21167
21168@item Phrase searches
21169If you wrap your query in double-quotes then it will be treated as a
21170literal string.
21171
21172@end table
21173
21174By default the whole message will be searched. The query can be limited
21175to a specific part of a message by using a prefix-arg. After inputting
21176the query this will prompt (with completion) for a message part.
21177Choices include ``Whole message'', ``Subject'', ``From'', and
21178``To''. Any unrecognized input is interpreted as a header name. For
21179example, typing @kbd{Message-ID} in response to this prompt will limit
21180the query to the Message-ID header.
21181
21182Finally selecting ``Imap'' will interpret the query as a raw
21183@acronym{IMAP} search query. The format of such queries can be found in
21184RFC3501.
21185
21186If you don't like the default of searching whole messages you can
21187customize @code{nnir-imap-default-search-key}. For example to use
21188@acronym{IMAP} queries by default
21189
21190@lisp
21191(setq nnir-imap-default-search-key "Imap")
21192@end lisp
21193
21194@node The gmane Engine
21195@subsubsection The gmane Engine
21196
21197The @code{gmane} engine requires no configuration.
21198
21199Gmane queries follow a simple query language:
21200
21201@table @samp
21202@item Boolean query operators
21203AND, OR, NOT (or AND NOT), and XOR are supported, and brackets can be
21204used to control operator precedence, e.g. (emacs OR xemacs) AND linux.
21205Note that operators must be written with all capital letters to be
21206recognised.
21207
21208@item Required and excluded terms
21209+ and - can be used to require or exclude terms, e.g. football -american
21210
21211@item Unicode handling
21212The search engine converts all text to utf-8, so searching should work
21213in any language.
21214
21215@item Stopwords
21216Common English words (like 'the' and 'a') are ignored by default. You
21217can override this by prefixing such words with a + (e.g. +the) or
21218enclosing the word in quotes (e.g. "the").
21219
21220@end table
21221
21222The query can be limited to articles by a specific author using a
21223prefix-arg. After inputting the query this will prompt for an author
21224name (or part of a name) to match.
21225
21226@node The swish++ Engine
21227@subsubsection The swish++ Engine
21228
21229FIXEM: Say something more here.
21230
21231Documentation for swish++ may be found at the swish++ sourceforge page:
21232@uref{http://swishplusplus.sourceforge.net}
21233
21234@node The swish-e Engine
21235@subsubsection The swish-e Engine
21236
21237FIXEM: Say something more here.
21238
21239Documentation for swish-e may be found at the swish-e homepage
21240@uref{http://swish-e.org}
21241
21242@node The namazu Engine
21243@subsubsection The namazu Engine
21244
21245Using the namazu engine requires creating and maintaining index files.
21246One directory should contain all the index files, and nnir must be told
21247where to find them by setting the @code{nnir-namazu-index-directory}
21248variable.
21249
21250To work correctly the @code{nnir-namazu-remove-prefix} variable must
21251also be correct. This is the prefix to remove from each file name
21252returned by Namazu in order to get a proper group name (albeit with `/'
21253instead of `.').
21254
21255For example, suppose that Namazu returns file names such as
21256@samp{/home/john/Mail/mail/misc/42}. For this example, use the
21257following setting: @code{(setq nnir-namazu-remove-prefix
21258"/home/john/Mail/")} Note the trailing slash. Removing this prefix from
21259the directory gives @samp{mail/misc/42}. @code{nnir} knows to remove
21260the @samp{/42} and to replace @samp{/} with @samp{.} to arrive at the
21261correct group name @samp{mail.misc}.
21262
21263Extra switches may be passed to the namazu search command by setting the
21264variable @code{nnir-namazu-additional-switches}. It is particularly
21265important not to pass any any switches to namazu that will change the
21266output format. Good switches to use include `--sort', `--ascending',
21267`--early' and `--late'. Refer to the Namazu documentation for further
21268information on valid switches.
21269
21270Mail must first be indexed with the `mknmz' program. Read the documentation
21271for namazu to create a configuration file. Here is an example:
21272
21273@cartouche
21274@example
21275 package conf; # Don't remove this line!
21276
21277 # Paths which will not be indexed. Don't use `^' or `$' anchors.
21278 $EXCLUDE_PATH = "spam|sent";
21279
21280 # Header fields which should be searchable. case-insensitive
21281 $REMAIN_HEADER = "from|date|message-id|subject";
21282
21283 # Searchable fields. case-insensitive
21284 $SEARCH_FIELD = "from|date|message-id|subject";
21285
21286 # The max length of a word.
21287 $WORD_LENG_MAX = 128;
21288
21289 # The max length of a field.
21290 $MAX_FIELD_LENGTH = 256;
21291@end example
21292@end cartouche
21293
21294For this example, mail is stored in the directories @samp{~/Mail/mail/},
21295@samp{~/Mail/lists/} and @samp{~/Mail/archive/}, so to index them go to
21296the index directory set in @code{nnir-namazu-index-directory} and issue
21297the following command:
21298
21299@example
21300mknmz --mailnews ~/Mail/archive/ ~/Mail/mail/ ~/Mail/lists/
21301@end example
21302
21303For maximum searching efficiency you might want to have a cron job run
21304this command periodically, say every four hours.
21305
21306@node The hyrex Engine
21307@subsubsection The hyrex Engine
21308FIXME: Add documentation.
21309
21310@node Customizations
21311@subsubsection Custimozations
21312
21313@table @code
21314
21315@item nnir-method-default-engines
21316Alist of server backend - search engine pairs. The default associations
21317are
21318@example
21319(nnimap . imap)
21320(nntp . gmane)
21321@end example
21322
21323@item nnir-ignored-newsgroups
21324A regexp to match newsgroups in the active file that should be skipped
21325when searching all groups on a server.
21326
21327@item nnir-summary-line-format
21328The format specification to be used for lines in an nnir summary buffer.
21329All the items from `gnus-summary-line-format' are available, along with
21330three items unique to nnir summary buffers:
21331
21332@example
21333%Z Search retrieval score value (integer)
21334%G Article original full group name (string)
21335%g Article original short group name (string)
21336@end example
21337
21338If nil (the default) this will use @code{gnus-summary-line-format}.
21339
21340@item nnir-retrieve-headers-override-function
21341If non-nil, a function that retrieves article headers rather than using
21342the gnus built-in function. This function takes an article list and
21343group as arguments and populates the `nntp-server-buffer' with the
21344retrieved headers. It should then return either 'nov or 'headers
21345indicating the retrieved header format. Failure to retrieve headers
21346should return @code{nil}
21347
21348If this variable is nil, or if the provided function returns nil for a
21349search result, @code{gnus-retrieve-headers} will be called instead."
21350
21351
21352@end table
21353
21354
21355@node nnmairix
21356@section nnmairix
21357
21358@cindex mairix
21359@cindex nnmairix
21360This paragraph describes how to set up mairix and the back end
21361@code{nnmairix} for indexing and searching your mail from within
21362Gnus. Additionally, you can create permanent ``smart'' groups which are
21363bound to mairix searches and are automatically updated.
21364
21365@menu
21366* About mairix:: About the mairix mail search engine
21367* nnmairix requirements:: What you will need for using nnmairix
21368* What nnmairix does:: What does nnmairix actually do?
21369* Setting up mairix:: Set up your mairix installation
21370* Configuring nnmairix:: Set up the nnmairix back end
21371* nnmairix keyboard shortcuts:: List of available keyboard shortcuts
21372* Propagating marks:: How to propagate marks from nnmairix groups
21373* nnmairix tips and tricks:: Some tips, tricks and examples
21374* nnmairix caveats:: Some more stuff you might want to know
21375@end menu
21376
21377@c FIXME: The markup in this section might need improvement.
21378@c E.g. adding @samp, @var, @file, @command, etc.
21379@c Cf. (info "(texinfo)Indicating")
21380
21381@node About mairix
21382@subsection About mairix
21383
21384Mairix is a tool for indexing and searching words in locally stored
21385mail. It was written by Richard Curnow and is licensed under the
21386GPL. Mairix comes with most popular GNU/Linux distributions, but it also
21387runs under Windows (with cygwin), Mac OS X and Solaris. The homepage can
21388be found at
21389@uref{http://www.rpcurnow.force9.co.uk/mairix/index.html}
21390
21391Though mairix might not be as flexible as other search tools like
21392swish++ or namazu, which you can use via the @code{nnir} back end, it
21393has the prime advantage of being incredibly fast. On current systems, it
21394can easily search through headers and message bodies of thousands and
21395thousands of mails in well under a second. Building the database
21396necessary for searching might take a minute or two, but only has to be
21397done once fully. Afterwards, the updates are done incrementally and
21398therefore are really fast, too. Additionally, mairix is very easy to set
21399up.
21400
21401For maximum speed though, mairix should be used with mails stored in
21402@code{Maildir} or @code{MH} format (this includes the @code{nnml} back
21403end), although it also works with mbox. Mairix presents the search
21404results by populating a @emph{virtual} maildir/MH folder with symlinks
21405which point to the ``real'' message files (if mbox is used, copies are
21406made). Since mairix already presents search results in such a virtual
21407mail folder, it is very well suited for using it as an external program
21408for creating @emph{smart} mail folders, which represent certain mail
21409searches.
21410
21411@node nnmairix requirements
21412@subsection nnmairix requirements
21413
21414Mairix searches local mail---that means, mairix absolutely must have
21415direct access to your mail folders. If your mail resides on another
21416server (e.g. an @acronym{IMAP} server) and you happen to have shell
21417access, @code{nnmairix} supports running mairix remotely, e.g. via ssh.
21418
21419Additionally, @code{nnmairix} only supports the following Gnus back
21420ends: @code{nnml}, @code{nnmaildir}, and @code{nnimap}. You must use
21421one of these back ends for using @code{nnmairix}. Other back ends, like
21422@code{nnmbox}, @code{nnfolder} or @code{nnmh}, won't work.
21423
21424If you absolutely must use mbox and still want to use @code{nnmairix},
21425you can set up a local @acronym{IMAP} server, which you then access via
21426@code{nnimap}. This is a rather massive setup for accessing some mbox
21427files, so just change to MH or Maildir already... However, if you're
21428really, really passionate about using mbox, you might want to look into
21429the package @file{mairix.el}, which comes with Emacs 23.
21430
21431@node What nnmairix does
21432@subsection What nnmairix does
21433
21434The back end @code{nnmairix} enables you to call mairix from within Gnus,
21435either to query mairix with a search term or to update the
21436database. While visiting a message in the summary buffer, you can use
21437several pre-defined shortcuts for calling mairix, e.g. to quickly
21438search for all mails from the sender of the current message or to
21439display the whole thread associated with the message, even if the
21440mails are in different folders.
21441
21442Additionally, you can create permanent @code{nnmairix} groups which are bound
21443to certain mairix searches. This way, you can easily create a group
21444containing mails from a certain sender, with a certain subject line or
21445even for one specific thread based on the Message-ID. If you check for
21446new mail in these folders (e.g. by pressing @kbd{g} or @kbd{M-g}), they
21447automatically update themselves by calling mairix.
21448
21449You might ask why you need @code{nnmairix} at all, since mairix already
21450creates the group, populates it with links to the mails so that you can
21451then access it with Gnus, right? Well, this @emph{might} work, but often
21452does not---at least not without problems. Most probably you will get
21453strange article counts, and sometimes you might see mails which Gnus
21454claims have already been canceled and are inaccessible. This is due to
21455the fact that Gnus isn't really amused when things are happening behind
21456its back. Another problem can be the mail back end itself, e.g. if you
21457use mairix with an @acronym{IMAP} server (I had Dovecot complaining
21458about corrupt index files when mairix changed the contents of the search
21459group). Using @code{nnmairix} should circumvent these problems.
21460
21461@code{nnmairix} is not really a mail back end---it's actually more like
21462a wrapper, sitting between a ``real'' mail back end where mairix stores
21463the searches and the Gnus front end. You can choose between three
21464different mail back ends for the mairix folders: @code{nnml},
21465@code{nnmaildir} or @code{nnimap}. @code{nnmairix} will call the mairix
21466binary so that the search results are stored in folders named
21467@code{zz_mairix-<NAME>-<NUMBER>} on this mail back end, but it will
21468present these folders in the Gnus front end only with @code{<NAME>}.
21469You can use an existing mail back end where you already store your mail,
21470but if you're uncomfortable with @code{nnmairix} creating new mail
21471groups alongside your other mail, you can also create e.g. a new
21472@code{nnmaildir} or @code{nnml} server exclusively for mairix, but then
21473make sure those servers do not accidentally receive your new mail
21474(@pxref{nnmairix caveats}). A special case exists if you want to use
21475mairix remotely on an IMAP server with @code{nnimap}---here the mairix
21476folders and your other mail must be on the same @code{nnimap} back end.
21477
21478@node Setting up mairix
21479@subsection Setting up mairix
21480
21481First: create a backup of your mail folders (@pxref{nnmairix caveats}).
21482
21483Setting up mairix is easy: simply create a @file{.mairixrc} file with
21484(at least) the following entries:
21485
21486@example
21487# Your Maildir/MH base folder
21488base=~/Maildir
21489@end example
21490
21491This is the base folder for your mails. All the following directories
21492are relative to this base folder. If you want to use @code{nnmairix}
21493with @code{nnimap}, this base directory has to point to the mail
21494directory where the @acronym{IMAP} server stores the mail folders!
21495
21496@example
21497maildir= ... your maildir folders which should be indexed ...
21498mh= ... your nnml/mh folders which should be indexed ...
21499mbox = ... your mbox files which should be indexed ...
21500@end example
21501
21502This specifies all your mail folders and mbox files (relative to the
21503base directory!) you want to index with mairix. Note that the
21504@code{nnml} back end saves mails in MH format, so you have to put those
21505directories in the @code{mh} line. See the example at the end of this
21506section and mairixrc's man-page for further details.
21507
21508@example
21509omit=zz_mairix-*
21510@end example
21511
21512@vindex nnmairix-group-prefix
21513This should make sure that you don't accidentally index the mairix
21514search results. You can change the prefix of these folders with the
21515variable @code{nnmairix-group-prefix}.
21516
21517@example
21518mformat= ... 'maildir' or 'mh' ...
21519database= ... location of database file ...
21520@end example
21521
21522The @code{format} setting specifies the output format for the mairix
21523search folder. Set this to @code{mh} if you want to access search results
21524with @code{nnml}. Otherwise choose @code{maildir}.
21525
21526To summarize, here is my shortened @file{.mairixrc} file as an example:
21527
21528@example
21529base=~/Maildir
21530maildir=.personal:.work:.logcheck:.sent
21531mh=../Mail/nnml/*...
21532mbox=../mboxmail/mailarchive_year*
21533mformat=maildir
21534omit=zz_mairix-*
21535database=~/.mairixdatabase
21536@end example
21537
21538In this case, the base directory is @file{~/Maildir}, where all my Maildir
21539folders are stored. As you can see, the folders are separated by
21540colons. If you wonder why every folder begins with a dot: this is
21541because I use Dovecot as @acronym{IMAP} server, which again uses
21542@code{Maildir++} folders. For testing nnmairix, I also have some
21543@code{nnml} mail, which is saved in @file{~/Mail/nnml}. Since this has
21544to be specified relative to the @code{base} directory, the @code{../Mail}
21545notation is needed. Note that the line ends in @code{*...}, which means
21546to recursively scan all files under this directory. Without the three
21547dots, the wildcard @code{*} will not work recursively. I also have some
21548old mbox files with archived mail lying around in @file{~/mboxmail}.
21549The other lines should be obvious.
21550
21551See the man page for @code{mairixrc} for details and further options,
21552especially regarding wildcard usage, which may be a little different
21553than you are used to.
21554
21555Now simply call @code{mairix} to create the index for the first time.
21556Note that this may take a few minutes, but every following index will do
21557the updates incrementally and hence is very fast.
21558
21559@node Configuring nnmairix
21560@subsection Configuring nnmairix
21561
21562In group mode, type @kbd{G b c}
21563(@code{nnmairix-create-server-and-default-group}). This will ask you for all
21564necessary information and create a @code{nnmairix} server as a foreign
21565server. You will have to specify the following:
21566
21567@itemize @bullet
21568
21569@item
21570The @strong{name} of the @code{nnmairix} server---choose whatever you
21571want.
21572
21573@item
21574The name of the @strong{back end server} where mairix should store its
21575searches. This must be a full server name, like @code{nnml:mymail}.
21576Just hit @kbd{TAB} to see the available servers. Currently, servers
21577which are accessed through @code{nnmaildir}, @code{nnimap} and
21578@code{nnml} are supported. As explained above, for locally stored
21579mails, this can be an existing server where you store your mails.
21580However, you can also create e.g. a new @code{nnmaildir} or @code{nnml}
21581server exclusively for @code{nnmairix} in your secondary select methods
21582(@pxref{Finding the News}). If you use a secondary @code{nnml} server
21583just for mairix, make sure that you explicitly set the server variable
21584@code{nnml-get-new-mail} to @code{nil}, or you might lose mail
21585(@pxref{nnmairix caveats}). If you want to use mairix remotely on an
21586@acronym{IMAP} server, you have to choose the corresponding
21587@code{nnimap} server here.
21588
21589@item
21590@vindex nnmairix-mairix-search-options
21591The @strong{command} to call the mairix binary. This will usually just
21592be @code{mairix}, but you can also choose something like @code{ssh
21593SERVER mairix} if you want to call mairix remotely, e.g. on your
21594@acronym{IMAP} server. If you want to add some default options to
21595mairix, you could do this here, but better use the variable
21596@code{nnmairix-mairix-search-options} instead.
21597
21598@item
21599The name of the @strong{default search group}. This will be the group
21600where all temporary mairix searches are stored, i.e. all searches which
21601are not bound to permanent @code{nnmairix} groups. Choose whatever you
21602like.
21603
21604@item
21605If the mail back end is @code{nnimap} or @code{nnmaildir}, you will be
21606asked if you work with @strong{Maildir++}, i.e. with hidden maildir
21607folders (=beginning with a dot). For example, you have to answer
21608@samp{yes} here if you work with the Dovecot @acronym{IMAP}
21609server. Otherwise, you should answer @samp{no} here.
21610
21611@end itemize
21612
21613@node nnmairix keyboard shortcuts
21614@subsection nnmairix keyboard shortcuts
21615
21616In group mode:
21617
21618@table @kbd
21619
21620@item G b c
21621@kindex G b c (Group)
21622@findex nnmairix-create-server-and-default-group
21623Creates @code{nnmairix} server and default search group for this server
21624(@code{nnmairix-create-server-and-default-group}). You should have done
21625this by now (@pxref{Configuring nnmairix}).
21626
21627@item G b s
21628@kindex G b s (Group)
21629@findex nnmairix-search
21630Prompts for query which is then sent to the mairix binary. Search
21631results are put into the default search group which is automatically
21632displayed (@code{nnmairix-search}).
21633
21634@item G b m
21635@kindex G b m (Group)
21636@findex nnmairix-widget-search
21637Allows you to create a mairix search or a permanent group more
21638comfortably using graphical widgets, similar to a customization
21639group. Just try it to see how it works (@code{nnmairix-widget-search}).
21640
21641@item G b i
21642@kindex G b i (Group)
21643@findex nnmairix-search-interactive
21644Another command for creating a mairix query more comfortably, but uses
21645only the minibuffer (@code{nnmairix-search-interactive}).
21646
21647@item G b g
21648@kindex G b g (Group)
21649@findex nnmairix-create-search-group
21650Creates a permanent group which is associated with a search query
21651(@code{nnmairix-create-search-group}). The @code{nnmairix} back end
21652automatically calls mairix when you update this group with @kbd{g} or
21653@kbd{M-g}.
21654
21655@item G b q
21656@kindex G b q (Group)
21657@findex nnmairix-group-change-query-this-group
21658Changes the search query for the @code{nnmairix} group under cursor
21659(@code{nnmairix-group-change-query-this-group}).
21660
21661@item G b t
21662@kindex G b t (Group)
21663@findex nnmairix-group-toggle-threads-this-group
21664Toggles the 'threads' parameter for the @code{nnmairix} group under cursor,
21665i.e. if you want see the whole threads of the found messages
21666(@code{nnmairix-group-toggle-threads-this-group}).
21667
21668@item G b u
21669@kindex G b u (Group)
21670@findex nnmairix-update-database
21671@vindex nnmairix-mairix-update-options
21672Calls mairix binary for updating the database
21673(@code{nnmairix-update-database}). The default parameters are @code{-F}
21674and @code{-Q} for making this as fast as possible (see variable
21675@code{nnmairix-mairix-update-options} for defining these default
21676options).
21677
21678@item G b r
21679@kindex G b r (Group)
21680@findex nnmairix-group-toggle-readmarks-this-group
21681Keep articles in this @code{nnmairix} group always read or unread, or leave the
21682marks unchanged (@code{nnmairix-group-toggle-readmarks-this-group}).
21683
21684@item G b d
21685@kindex G b d (Group)
21686@findex nnmairix-group-delete-recreate-this-group
21687Recreate @code{nnmairix} group on the ``real'' mail back end
21688(@code{nnmairix-group-delete-recreate-this-group}). You can do this if
21689you always get wrong article counts with a @code{nnmairix} group.
21690
21691@item G b a
21692@kindex G b a (Group)
21693@findex nnmairix-group-toggle-allowfast-this-group
21694Toggles the @code{allow-fast} parameters for group under cursor
21695(@code{nnmairix-group-toggle-allowfast-this-group}). The default
21696behavior of @code{nnmairix} is to do a mairix search every time you
21697update or enter the group. With the @code{allow-fast} parameter set,
21698mairix will only be called when you explicitly update the group, but not
21699upon entering. This makes entering the group faster, but it may also
21700lead to dangling symlinks if something changed between updating and
21701entering the group which is not yet in the mairix database.
21702
21703@item G b p
21704@kindex G b p (Group)
21705@findex nnmairix-group-toggle-propmarks-this-group
21706Toggle marks propagation for this group
21707(@code{nnmairix-group-toggle-propmarks-this-group}). (@pxref{Propagating
21708marks}).
21709
21710@item G b o
21711@kindex G b o (Group)
21712@findex nnmairix-propagate-marks
21713Manually propagate marks (@code{nnmairix-propagate-marks}); needed only when
21714@code{nnmairix-propagate-marks-upon-close} is set to @code{nil}.
21715
21716@end table
21717
21718In summary mode:
21719
21720@table @kbd
21721
21722@item $ m
21723@kindex $ m (Summary)
21724@findex nnmairix-widget-search-from-this-article
21725Allows you to create a mairix query or group based on the current
21726message using graphical widgets (same as @code{nnmairix-widget-search})
21727(@code{nnmairix-widget-search-from-this-article}).
21728
21729@item $ g
21730@kindex $ g (Summary)
21731@findex nnmairix-create-search-group-from-message
21732Interactively creates a new search group with query based on the current
21733message, but uses the minibuffer instead of graphical widgets
21734(@code{nnmairix-create-search-group-from-message}).
21735
21736@item $ t
21737@kindex $ t (Summary)
21738@findex nnmairix-search-thread-this-article
21739Searches thread for the current article
21740(@code{nnmairix-search-thread-this-article}). This is effectively a
21741shortcut for calling @code{nnmairix-search} with @samp{m:msgid} of the
21742current article and enabled threads.
21743
21744@item $ f
21745@kindex $ f (Summary)
21746@findex nnmairix-search-from-this-article
21747Searches all messages from sender of the current article
21748(@code{nnmairix-search-from-this-article}). This is a shortcut for
21749calling @code{nnmairix-search} with @samp{f:From}.
21750
21751@item $ o
21752@kindex $ o (Summary)
21753@findex nnmairix-goto-original-article
21754(Only in @code{nnmairix} groups!) Tries determine the group this article
21755originally came from and displays the article in this group, so that
21756e.g. replying to this article the correct posting styles/group
21757parameters are applied (@code{nnmairix-goto-original-article}). This
21758function will use the registry if available, but can also parse the
21759article file name as a fallback method.
21760
21761@item $ u
21762@kindex $ u (Summary)
21763@findex nnmairix-remove-tick-mark-original-article
21764Remove possibly existing tick mark from original article
21765(@code{nnmairix-remove-tick-mark-original-article}). (@pxref{nnmairix
21766tips and tricks}).
21767
21768@end table
21769
21770@node Propagating marks
21771@subsection Propagating marks
21772
21773First of: you really need a patched mairix binary for using the marks
21774propagation feature efficiently. Otherwise, you would have to update
21775the mairix database all the time. You can get the patch at
21776
21777@uref{http://www.randomsample.de/mairix-maildir-patch.tar}
21778
21779You need the mairix v0.21 source code for this patch; everything else
21780is explained in the accompanied readme file. If you don't want to use
21781marks propagation, you don't have to apply these patches, but they also
21782fix some annoyances regarding changing maildir flags, so it might still
21783be useful to you.
21784
21785With the patched mairix binary, you can use @code{nnmairix} as an
21786alternative to mail splitting (@pxref{Fancy Mail Splitting}). For
21787example, instead of splitting all mails from @samp{david@@foobar.com}
21788into a group, you can simply create a search group with the query
21789@samp{f:david@@foobar.com}. This is actually what ``smart folders'' are
21790all about: simply put everything in one mail folder and dynamically
21791create searches instead of splitting. This is more flexible, since you
21792can dynamically change your folders any time you want to. This also
21793implies that you will usually read your mails in the @code{nnmairix}
21794groups instead of your ``real'' mail groups.
21795
21796There is one problem, though: say you got a new mail from
21797@samp{david@@foobar.com}; it will now show up in two groups, the
21798``real'' group (your INBOX, for example) and in the @code{nnmairix}
21799search group (provided you have updated the mairix database). Now you
21800enter the @code{nnmairix} group and read the mail. The mail will be
21801marked as read, but only in the @code{nnmairix} group---in the ``real''
21802mail group it will be still shown as unread.
21803
21804You could now catch up the mail group (@pxref{Group Data}), but this is
21805tedious and error prone, since you may overlook mails you don't have
21806created @code{nnmairix} groups for. Of course, you could first use
21807@code{nnmairix-goto-original-article} (@pxref{nnmairix keyboard
21808shortcuts}) and then read the mail in the original group, but that's
21809even more cumbersome.
21810
21811Clearly, the easiest way would be if marks could somehow be
21812automatically set for the original article. This is exactly what
21813@emph{marks propagation} is about.
21814
21815Marks propagation is deactivated by default. You can activate it for a
21816certain @code{nnmairix} group with
21817@code{nnmairix-group-toggle-propmarks-this-group} (bound to @kbd{G b
21818p}). This function will warn you if you try to use it with your default
21819search group; the reason is that the default search group is used for
21820temporary searches, and it's easy to accidentally propagate marks from
21821this group. However, you can ignore this warning if you really want to.
21822
21823With marks propagation enabled, all the marks you set in a @code{nnmairix}
21824group should now be propagated to the original article. For example,
21825you can now tick an article (by default with @kbd{!}) and this mark should
21826magically be set for the original article, too.
21827
21828A few more remarks which you may or may not want to know:
21829
21830@vindex nnmairix-propagate-marks-upon-close
21831Marks will not be set immediately, but only upon closing a group. This
21832not only makes marks propagation faster, it also avoids problems with
21833dangling symlinks when dealing with maildir files (since changing flags
21834will change the file name). You can also control when to propagate marks
21835via @code{nnmairix-propagate-marks-upon-close} (see the doc-string for
21836details).
21837
21838Obviously, @code{nnmairix} will have to look up the original group for every
21839article you want to set marks for. If available, @code{nnmairix} will first use
21840the registry for determining the original group. The registry is very
21841fast, hence you should really, really enable the registry when using
21842marks propagation. If you don't have to worry about RAM and disc space,
21843set @code{gnus-registry-max-entries} to a large enough value; to be on
21844the safe side, choose roughly the amount of mails you index with mairix.
21845
21846@vindex nnmairix-only-use-registry
21847If you don't want to use the registry or the registry hasn't seen the
21848original article yet, @code{nnmairix} will use an additional mairix
21849search for determining the file name of the article. This, of course, is
21850way slower than the registry---if you set hundreds or even thousands of
21851marks this way, it might take some time. You can avoid this situation by
21852setting @code{nnmairix-only-use-registry} to t.
21853
21854Maybe you also want to propagate marks the other way round, i.e. if you
21855tick an article in a "real" mail group, you'd like to have the same
21856article in a @code{nnmairix} group ticked, too. For several good
21857reasons, this can only be done efficiently if you use maildir. To
21858immediately contradict myself, let me mention that it WON'T work with
21859@code{nnmaildir}, since @code{nnmaildir} stores the marks externally and
21860not in the file name. Therefore, propagating marks to @code{nnmairix}
21861groups will usually only work if you use an IMAP server which uses
21862maildir as its file format.
21863
21864@vindex nnmairix-propagate-marks-to-nnmairix-groups
21865If you work with this setup, just set
21866@code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t} and see what
21867happens. If you don't like what you see, just set it to @code{nil} again. One
21868problem might be that you get a wrong number of unread articles; this
21869usually happens when you delete or expire articles in the original
21870groups. When this happens, you can recreate the @code{nnmairix} group on the
21871back end using @kbd{G b d}.
21872
21873@node nnmairix tips and tricks
21874@subsection nnmairix tips and tricks
21875
21876@itemize
21877@item
21878Checking Mail
21879
21880@findex nnmairix-update-groups
21881I put all my important mail groups at group level 1. The mairix groups
21882have group level 5, so they do not get checked at start up (@pxref{Group
21883Levels}).
21884
21885I use the following to check for mails:
21886
21887@lisp
21888(defun my-check-mail-mairix-update (level)
21889 (interactive "P")
21890 ;; if no prefix given, set level=1
21891 (gnus-group-get-new-news (or level 1))
21892 (nnmairix-update-groups "mairixsearch" t t)
21893 (gnus-group-list-groups))
21894
21895(define-key gnus-group-mode-map "g" 'my-check-mail-mairix-update)
21896@end lisp
21897
21898Instead of @samp{"mairixsearch"} use the name of your @code{nnmairix}
21899server. See the doc string for @code{nnmairix-update-groups} for
21900details.
21901
21902@item
21903Example: search group for ticked articles
21904
21905For example, you can create a group for all ticked articles, where the
21906articles always stay unread:
21907
21908Hit @kbd{G b g}, enter group name (e.g. @samp{important}), use
21909@samp{F:f} as query and do not include threads.
21910
21911Now activate marks propagation for this group by using @kbd{G b p}. Then
21912activate the always-unread feature by using @kbd{G b r} twice.
21913
21914So far so good---but how do you remove the tick marks in the @code{nnmairix}
21915group? There are two options: You may simply use
21916@code{nnmairix-remove-tick-mark-original-article} (bound to @kbd{$ u}) to remove
21917tick marks from the original article. The other possibility is to set
21918@code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t}, but see the above
21919comments about this option. If it works for you, the tick marks should
21920also exist in the @code{nnmairix} group and you can remove them as usual,
21921e.g. by marking an article as read.
21922
21923When you have removed a tick mark from the original article, this
21924article should vanish from the @code{nnmairix} group after you have updated the
21925mairix database and updated the group. Fortunately, there is a function
21926for doing exactly that: @code{nnmairix-update-groups}. See the previous code
21927snippet and the doc string for details.
21928
21929@item
21930Dealing with auto-subscription of mail groups
21931
21932As described before, all @code{nnmairix} groups are in fact stored on
21933the mail back end in the form @samp{zz_mairix-<NAME>-<NUMBER>}. You can
21934see them when you enter the back end server in the server buffer. You
21935should not subscribe these groups! Unfortunately, these groups will
21936usually get @emph{auto-subscribed} when you use @code{nnmaildir} or
21937@code{nnml}, i.e. you will suddenly see groups of the form
21938@samp{zz_mairix*} pop up in your group buffer. If this happens to you,
21939simply kill these groups with C-k. For avoiding this, turn off
21940auto-subscription completely by setting the variable
21941@code{gnus-auto-subscribed-groups} to @code{nil} (@pxref{Filtering New
21942Groups}), or if you like to keep this feature use the following kludge
21943for turning it off for all groups beginning with @samp{zz_}:
21944
21945@lisp
21946(setq gnus-auto-subscribed-groups
21947 "^\\(nnml\\|nnfolder\\|nnmbox\\|nnmh\\|nnbabyl\\|nnmaildir\\).*:\\([^z]\\|z$\\|\\z[^z]\\|zz$\\|zz[^_]\\|zz_$\\).*")
21948@end lisp
21949
21950@end itemize
21951
21952@node nnmairix caveats
21953@subsection nnmairix caveats
21954
21955@itemize
21956@item
21957You can create a secondary @code{nnml} server just for nnmairix, but then
21958you have to explicitly set the corresponding server variable
21959@code{nnml-get-new-mail} to @code{nil}. Otherwise, new mail might get
21960put into this secondary server (and would never show up again). Here's
21961an example server definition:
21962
21963@lisp
21964(nnml "mairix" (nnml-directory "mairix") (nnml-get-new-mail nil))
21965@end lisp
21966
21967(The @code{nnmaildir} back end also has a server variabe
21968@code{get-new-mail}, but its default value is @code{nil}, so you don't
21969have to explicitly set it if you use a @code{nnmaildir} server just for
21970mairix.)
21971
21972@item
21973If you use the Gnus registry: don't use the registry with
21974@code{nnmairix} groups (put them in
21975@code{gnus-registry-unfollowed-groups}). Be @emph{extra careful} if
21976you use @code{gnus-registry-split-fancy-with-parent}; mails which are
21977split into @code{nnmairix} groups are usually gone for good as soon as
21978you check the group for new mail (yes, it has happened to me...).
21979
21980@item
21981Therefore: @emph{Never ever} put ``real'' mails into @code{nnmairix}
21982groups (you shouldn't be able to, anyway).
21983
21984@item
21985If you use the Gnus agent (@pxref{Gnus Unplugged}): don't agentize
21986@code{nnmairix} groups (though I have no idea what happens if you do).
21987
21988@item
21989mairix does only support us-ascii characters.
21990
21991@item
21992@code{nnmairix} uses a rather brute force method to force Gnus to
21993completely reread the group on the mail back end after mairix was
21994called---it simply deletes and re-creates the group on the mail
21995back end. So far, this has worked for me without any problems, and I
21996don't see how @code{nnmairix} could delete other mail groups than its
21997own, but anyway: you really should have a backup of your mail
21998folders.
21999
22000@item
22001All necessary information is stored in the group parameters
22002(@pxref{Group Parameters}). This has the advantage that no active file
22003is needed, but also implies that when you kill a @code{nnmairix} group,
22004it is gone for good.
22005
22006@item
22007@findex nnmairix-purge-old-groups
22008If you create and kill a lot of @code{nnmairix} groups, the
22009``zz_mairix-*'' groups will accumulate on the mail back end server. To
22010delete old groups which are no longer needed, call
22011@code{nnmairix-purge-old-groups}. Note that this assumes that you don't
22012save any ``real'' mail in folders of the form
22013@code{zz_mairix-<NAME>-<NUMBER>}. You can change the prefix of
22014@code{nnmairix} groups by changing the variable
22015@code{nnmairix-group-prefix}.
22016
22017@item
22018The following only applies if you @emph{don't} use the mentioned patch
22019for mairix (@pxref{Propagating marks}):
22020
22021A problem can occur when using @code{nnmairix} with maildir folders and
22022comes with the fact that maildir stores mail flags like @samp{Seen} or
22023@samp{Replied} by appending chars @samp{S} and @samp{R} to the message
22024file name, respectively. This implies that currently you would have to
22025update the mairix database not only when new mail arrives, but also when
22026mail flags are changing. The same applies to new mails which are indexed
22027while they are still in the @samp{new} folder but then get moved to
22028@samp{cur} when Gnus has seen the mail. If you don't update the database
22029after this has happened, a mairix query can lead to symlinks pointing to
22030non-existing files. In Gnus, these messages will usually appear with
22031``(none)'' entries in the header and can't be accessed. If this happens
22032to you, using @kbd{G b u} and updating the group will usually fix this.
22033
22034@end itemize
22035
21694@iftex 22036@iftex
21695@iflatex 22037@iflatex
21696@chapter Message 22038@chapter Message