unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* How to index /var/spool/mail with notmuch
@ 2009-11-22 20:24 Tassilo Horn
  2009-11-22 20:48 ` Jed Brown
  2009-11-23  4:30 ` Carl Worth
  0 siblings, 2 replies; 6+ messages in thread
From: Tassilo Horn @ 2009-11-22 20:24 UTC (permalink / raw)
  To: notmuch

Hi all,

I'd like to try out notmuch.  My mail setup is as follows:

  - I run a local IMAP server (dovecot) and access it using Gnus
  - Dovecot stores its mails in /var/spool/mail/ in some one file per
    message format

But I get some permission problems when trying to index /var/spool/mail.
I was able to create a .notmuch/ directory in there with permissions set
to 700 for my user.  All mail files are readable for my user.

Unfortunately, there are some dovecot internal files, which should
neither be indexed by notmuch, and which have 600 permissions for the
mail user.  And that's where notmuch errors and stops indexing. :-(

All "real" mail files are named "u.<number>", so it would be cool if I
could provide a pattern to notmuch matching all files I'd like to index.
And maybe the other way round (a blacklist pattern) would be useful,
too.

Any thoughts?  Maybe there's a better approach for what I'm trying to
do?

Bye,
Tassilo

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

* Re: How to index /var/spool/mail with notmuch
  2009-11-22 20:24 How to index /var/spool/mail with notmuch Tassilo Horn
@ 2009-11-22 20:48 ` Jed Brown
  2009-11-22 21:00   ` Tassilo Horn
  2009-11-23  4:30 ` Carl Worth
  1 sibling, 1 reply; 6+ messages in thread
From: Jed Brown @ 2009-11-22 20:48 UTC (permalink / raw)
  To: Tassilo Horn, notmuch

On Sun, 22 Nov 2009 21:24:47 +0100, Tassilo Horn <tassilo@member.fsf.org> wrote:
> Hi all,
> 
> I'd like to try out notmuch.  My mail setup is as follows:
> 
>   - I run a local IMAP server (dovecot) and access it using Gnus
>   - Dovecot stores its mails in /var/spool/mail/ in some one file per
>     message format

How about

$ mkdir -p ~/mail/spool
$ ln -s /var/spool/mail/$USER/{cur,new,tmp} ~/mail/spool

and point notmuch at ~/mail (or specifically ~/mail/spool).


Jed

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

* Re: How to index /var/spool/mail with notmuch
  2009-11-22 20:48 ` Jed Brown
@ 2009-11-22 21:00   ` Tassilo Horn
  0 siblings, 0 replies; 6+ messages in thread
From: Tassilo Horn @ 2009-11-22 21:00 UTC (permalink / raw)
  To: Jed Brown; +Cc: notmuch

Jed Brown <jed@59A2.org> writes:

Hi Jed,

>>   - I run a local IMAP server (dovecot) and access it using Gnus
>>   - Dovecot stores its mails in /var/spool/mail/ in some one file per
>>     message format
>
> How about
>
> $ mkdir -p ~/mail/spool
> $ ln -s /var/spool/mail/$USER/{cur,new,tmp} ~/mail/spool
>
> and point notmuch at ~/mail (or specifically ~/mail/spool).

Brilliant idea.  :-)

Ok, now it's indexing my 63000 mails.  10 minutes to go.

Bye,
Tassilo

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

* Re: How to index /var/spool/mail with notmuch
  2009-11-22 20:24 How to index /var/spool/mail with notmuch Tassilo Horn
  2009-11-22 20:48 ` Jed Brown
@ 2009-11-23  4:30 ` Carl Worth
  2009-11-23  7:42   ` Tassilo Horn
  1 sibling, 1 reply; 6+ messages in thread
From: Carl Worth @ 2009-11-23  4:30 UTC (permalink / raw)
  To: Tassilo Horn, notmuch

On Sun, 22 Nov 2009 21:24:47 +0100, Tassilo Horn <tassilo@member.fsf.org> wrote:
> But I get some permission problems when trying to index /var/spool/mail.
> I was able to create a .notmuch/ directory in there with permissions set
> to 700 for my user.  All mail files are readable for my user.
> 
> Unfortunately, there are some dovecot internal files, which should
> neither be indexed by notmuch, and which have 600 permissions for the
> mail user.  And that's where notmuch errors and stops indexing. :-(

Hi Tassilo, welcome to notmuch!

I'm glad you found a workaround for this problem, (thanks Jed!).

But perhaps these errors should be made into warnings instead? Any
thoughts on that anyone?

> All "real" mail files are named "u.<number>", so it would be cool if I
> could provide a pattern to notmuch matching all files I'd like to index.
> And maybe the other way round (a blacklist pattern) would be useful,
> too.

I've been planning on having a blacklist pattern for a
while. Originally, the only difficulty in implementing it was that we
had nowhere to store configuration information. But we have a
configuration file now, so this would be a pretty easy thing to
implement.

It's not as obvious that a whitelist pattern would be as widely useful,
but it would be possible too.

-Carl

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

* Re: How to index /var/spool/mail with notmuch
  2009-11-23  4:30 ` Carl Worth
@ 2009-11-23  7:42   ` Tassilo Horn
  2009-11-26 20:53     ` Carl Worth
  0 siblings, 1 reply; 6+ messages in thread
From: Tassilo Horn @ 2009-11-23  7:42 UTC (permalink / raw)
  To: Carl Worth; +Cc: notmuch

Carl Worth <cworth@cworth.org> writes:

Hi Carl,

>> Unfortunately, there are some dovecot internal files, which should
>> neither be indexed by notmuch, and which have 600 permissions for the
>> mail user.  And that's where notmuch errors and stops indexing. :-(
>
> Hi Tassilo, welcome to notmuch!
>
> I'm glad you found a workaround for this problem, (thanks Jed!).

Trying out notmuch already cashed out. ;-)

> But perhaps these errors should be made into warnings instead? Any
> thoughts on that anyone?

I think so.  For other dovecot internal index files it already says
something like "Ignoring non-mail file foobar.idx" and simply skips that
file.  I think that's the right thing to do for files where it has no
read permissions for, too.

>> All "real" mail files are named "u.<number>", so it would be cool if
>> I could provide a pattern to notmuch matching all files I'd like to
>> index.  And maybe the other way round (a blacklist pattern) would be
>> useful, too.
>
> I've been planning on having a blacklist pattern for a while.
> Originally, the only difficulty in implementing it was that we had
> nowhere to store configuration information.  But we have a
> configuration file now, so this would be a pretty easy thing to
> implement.
>
> It's not as obvious that a whitelist pattern would be as widely
> useful, but it would be possible too.

Well, for dovecot users using the dbox format, a whitelist pattern would
be much simpler because of the coherent mail file naming.  But I could
live with a blacklist pattern, too.

Bye,
Tassilo

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

* Re: How to index /var/spool/mail with notmuch
  2009-11-23  7:42   ` Tassilo Horn
@ 2009-11-26 20:53     ` Carl Worth
  0 siblings, 0 replies; 6+ messages in thread
From: Carl Worth @ 2009-11-26 20:53 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: notmuch

On Mon, 23 Nov 2009 08:42:09 +0100, Tassilo Horn <tassilo@member.fsf.org> wrote:
> Carl Worth <cworth@cworth.org> writes:
>
> > But perhaps these errors should be made into warnings instead? Any
> > thoughts on that anyone?
> 
> I think so.  For other dovecot internal index files it already says
> something like "Ignoring non-mail file foobar.idx" and simply skips that
> file.  I think that's the right thing to do for files where it has no
> read permissions for, too.

OK. I've added that to our TODO list.

-Carl

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

end of thread, other threads:[~2009-11-26 20:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-22 20:24 How to index /var/spool/mail with notmuch Tassilo Horn
2009-11-22 20:48 ` Jed Brown
2009-11-22 21:00   ` Tassilo Horn
2009-11-23  4:30 ` Carl Worth
2009-11-23  7:42   ` Tassilo Horn
2009-11-26 20:53     ` Carl Worth

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).