Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* mairix search results
@ 2007-08-29 11:24 Austin Frank
  2007-08-29 11:58 ` David
  0 siblings, 1 reply; 2+ messages in thread
From: Austin Frank @ 2007-08-29 11:24 UTC (permalink / raw)
  To: info-gnus-english

Hello!

I recently started using mairix, a mail indexing tool.  Mairix allows
keyword searching in the body, headers, or attachment titles of all
indexed mailboxes.

Search results are written out into a mailbox format of the user's
choice.  Options include maildir, ml, and mbox.  For maildir and ml
formatted results, the directories contain symlinks to the original
message; for mbox, copies are made.

I set my .mairixrc like so:

    base=~/Maildir
    maildir=.mail.academic:.mail.general:.mail.misc:.mail.personal
    mfolder=~/Mairix/results
    mformat=maildir
    database=~/mairix_index

performing a search inserts symlinks to the results in
~/Mairix/results/cur.

I added this directory to my list of secondary select methods

    (setq gnus-secondary-select-methods
          '((nnmaildir "mairix"
             (directory "~/Mairix"))
            ;; (other methods...)
           ))

News correctly notices the new "nnmaildir+mairix:results" group.  So far
so good.

By default, mairix overwrites old results on each new search.  Gnus,
however, remembers all of the messages that have ever been in the
directory.  If the first search I run after creating the ~/Mairix
directory returns 100 results, and the next search returns 50, I expect
to see 50 as the number of messages in the group, but instead see 150.

I have gnus-agent set to t, which I guess could be affecting things.

Is there a way to tell the nnmaildir backend to forget about the
messages it has seen before?

I also have the option of serving maildir formatted mailboxes over imap
using a local installation of Dovecot.  Would forgetting previously seen
messages be possible with the nnimap backend?

If neither nnmaildir or nnimap supports this behavior, is there a way to
do it with nnml or nnmbox?

Thanks for any help,
/au

-- 
Austin Frank http://aufrank.net
GPG Public Key (D7398C2F):  http://aufrank.net/personal.asc

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mairix search results
  2007-08-29 11:24 mairix search results Austin Frank
@ 2007-08-29 11:58 ` David
  0 siblings, 0 replies; 2+ messages in thread
From: David @ 2007-08-29 11:58 UTC (permalink / raw)
  To: info-gnus-english

Austin Frank <austin.frank@gmail.com> writes:
> By default, mairix overwrites old results on each new search.  Gnus,
> however, remembers all of the messages that have ever been in the
> directory.  If the first search I run after creating the ~/Mairix
> directory returns 100 results, and the next search returns 50, I expect
> to see 50 as the number of messages in the group, but instead see 150.

I have written a Gnus backend for mairix (nnmairix.el) which I
hope to release shortly. I still have to resolve some minor bugs and
write some documentation. 

Writing this backend was more complicated than I thought due to the
problems you describe. Gnus isn't really amused when things are
happening behind its back.

> Is there a way to tell the nnmaildir backend to forget about the
> messages it has seen before?

After much fiddling I hope I resolved the issue by deleting and
re-creating the group using the nnmaildir backend. However, this leads
to a new problem since the article numbers then start again at 1, but
this is corrected by the nnmairix backend. If someone knows an easier
way I'd love to hear about it.

> I also have the option of serving maildir formatted mailboxes over imap
> using a local installation of Dovecot.  Would forgetting previously seen
> messages be possible with the nnimap backend?

I also happen to use Dovecot together with mairix, and it isn't really
amused either when the contents of mailboxes suddenly changes, so I also
use "delete and re-create mailbox" with nnimap before calling mairix.

Using nnmairix with nnml doesn't help, since mairix doesn't necessarily
produce consecutive article numbers, so the article count is usually wrong
(but gets corrected after you have entered the group).

-David

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-29 11:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-29 11:24 mairix search results Austin Frank
2007-08-29 11:58 ` David

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).