unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* weird paths in notmuch database
@ 2015-11-06 10:57 Davide Mancusi
  2015-11-06 13:09 ` David Bremner
  0 siblings, 1 reply; 10+ messages in thread
From: Davide Mancusi @ 2015-11-06 10:57 UTC (permalink / raw)
  To: notmuch

Hi all,

I have noticed that notmuch ends up with non-existing paths to some
messages. For instance:

$ notmuch search --output=files 'path:/home/**'
/export/home/username/mail//home/username/local/mail/archive/cur/1446805732.2711_9.hostname:2,S
/export/home/username/mail/archive/cur/1446805732.2711_9.hostname:2,S
[...] # more follow

Note that my mail folder is /export/home/username/mail. The first path
does not exist. However, I have a symlink from /home/username/local to
/export/home/username. Could that be the problem?

Also, is there a way to get rid of these non-existent paths in the
database? They are fed to another program in a script and it chokes on
them.

Thanks in advance for your help.

Cheers,
Davide

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

* Re: weird paths in notmuch database
  2015-11-06 10:57 weird paths in notmuch database Davide Mancusi
@ 2015-11-06 13:09 ` David Bremner
  2015-11-06 13:23   ` Davide Mancusi
  0 siblings, 1 reply; 10+ messages in thread
From: David Bremner @ 2015-11-06 13:09 UTC (permalink / raw)
  To: Davide Mancusi, notmuch

Davide Mancusi <arekfu@yahoo.it> writes:

> Hi all,
>
> I have noticed that notmuch ends up with non-existing paths to some
> messages. For instance:
>
> $ notmuch search --output=files 'path:/home/**'
> /export/home/username/mail//home/username/local/mail/archive/cur/1446805732.2711_9.hostname:2,S
> /export/home/username/mail/archive/cur/1446805732.2711_9.hostname:2,S
> [...] # more follow
>

I'm not sure if there are really bad paths in the database, or notmuch
is just handling illegal search syntax badly. To quote
notmuch-search-terms(7):

   The directory must be specified relative to the top-level maildir
   (and without the leading slash).

Please try with correct search syntax in order to narrow down the
problem.

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

* Re: weird paths in notmuch database
  2015-11-06 13:09 ` David Bremner
@ 2015-11-06 13:23   ` Davide Mancusi
  2015-11-06 15:14     ` Tomi Ollila
  0 siblings, 1 reply; 10+ messages in thread
From: Davide Mancusi @ 2015-11-06 13:23 UTC (permalink / raw)
  To: notmuch

2015-11-06 14:09 GMT+01:00 David Bremner <david@tethera.net>:
>> $ notmuch search --output=files 'path:/home/**'
>> /export/home/username/mail//home/username/local/mail/archive/cur/1446805732.2711_9.hostname:2,S
>> /export/home/username/mail/archive/cur/1446805732.2711_9.hostname:2,S
[...]
>
>    The directory must be specified relative to the top-level maildir
>    (and without the leading slash).
>
> Please try with correct search syntax in order to narrow down the
> problem.

The unusual search was just to illustrate the problem. I get the paths
even with tag searches, like so:

$ notmuch search --output=files
'id:20151106102835.GA2711@hostname.domain.com'
/export/home/username/mail//home/username/local/mail/archive/cur/1446805732.2711_9.hostname:2,S
/export/home/username/mail/archive/cur/1446805732.2711_9.hostname:2,S

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

* Re: weird paths in notmuch database
  2015-11-06 13:23   ` Davide Mancusi
@ 2015-11-06 15:14     ` Tomi Ollila
  2015-11-06 15:17       ` Davide Mancusi
  0 siblings, 1 reply; 10+ messages in thread
From: Tomi Ollila @ 2015-11-06 15:14 UTC (permalink / raw)
  To: Davide Mancusi, notmuch

On Fri, Nov 06 2015, Davide Mancusi <arekfu@yahoo.it> wrote:

> 2015-11-06 14:09 GMT+01:00 David Bremner <david@tethera.net>:
>>> $ notmuch search --output=files 'path:/home/**'
>>> /export/home/username/mail//home/username/local/mail/archive/cur/1446805732.2711_9.hostname:2,S
>>> /export/home/username/mail/archive/cur/1446805732.2711_9.hostname:2,S
> [...]
>>
>>    The directory must be specified relative to the top-level maildir
>>    (and without the leading slash).
>>
>> Please try with correct search syntax in order to narrow down the
>> problem.
>
> The unusual search was just to illustrate the problem. I get the paths
> even with tag searches, like so:
>
> $ notmuch search --output=files
> 'id:20151106102835.GA2711@hostname.domain.com'
> /export/home/username/mail//home/username/local/mail/archive/cur/1446805732.2711_9.hostname:2,S
> /export/home/username/mail/archive/cur/1446805732.2711_9.hostname:2,S


How is the symlink exactly shown in  ls -l /path/to/symlink  output ?

(you can do the s/$USER/username/ conversion :)

Tomi

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

* Re: weird paths in notmuch database
  2015-11-06 15:14     ` Tomi Ollila
@ 2015-11-06 15:17       ` Davide Mancusi
  2015-11-06 15:24         ` Tomi Ollila
  0 siblings, 1 reply; 10+ messages in thread
From: Davide Mancusi @ 2015-11-06 15:17 UTC (permalink / raw)
  To: notmuch

2015-11-06 16:14 GMT+01:00 Tomi Ollila <tomi.ollila@iki.fi>:
> How is the symlink exactly shown in  ls -l /path/to/symlink  output ?

$ ls -l /home/username/local
lrwxrwxrwx 1 username group 21 Jan 23  2015 /home/username/local ->
/export/home/username

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

* Re: weird paths in notmuch database
  2015-11-06 15:17       ` Davide Mancusi
@ 2015-11-06 15:24         ` Tomi Ollila
  2015-11-06 15:31           ` Davide Mancusi
  0 siblings, 1 reply; 10+ messages in thread
From: Tomi Ollila @ 2015-11-06 15:24 UTC (permalink / raw)
  To: Davide Mancusi, notmuch

On Fri, Nov 06 2015, Davide Mancusi <arekfu@yahoo.it> wrote:

> 2015-11-06 16:14 GMT+01:00 Tomi Ollila <tomi.ollila@iki.fi>:
>> How is the symlink exactly shown in  ls -l /path/to/symlink  output ?
>
> $ ls -l /home/username/local
> lrwxrwxrwx 1 username group 21 Jan 23  2015 /home/username/local ->
> /export/home/username

And notmuch config get database.path prints /export/home/username/mail 
I presume ?

If that is the case then this symlink should have no effect.

Is there any symlinks inside /export/home/username/mail 
( find /export/home/username/mail -type l ) (provided that
was the database.path -- and sure there are no bind mounts ;D?)

Tomi

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

* Re: weird paths in notmuch database
  2015-11-06 15:24         ` Tomi Ollila
@ 2015-11-06 15:31           ` Davide Mancusi
  2015-11-06 15:34             ` Tomi Ollila
  0 siblings, 1 reply; 10+ messages in thread
From: Davide Mancusi @ 2015-11-06 15:31 UTC (permalink / raw)
  To: notmuch

2015-11-06 16:24 GMT+01:00 Tomi Ollila <tomi.ollila@iki.fi>:
> And notmuch config get database.path prints /export/home/username/mail
> I presume ?

Correct.

> If that is the case then this symlink should have no effect.
>
> Is there any symlinks inside /export/home/username/mail
> ( find /export/home/username/mail -type l ) (provided that
> was the database.path -- and sure there are no bind mounts ;D?)

No symlinks and no bind mounts.

Cheers,
Davide

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

* Re: weird paths in notmuch database
  2015-11-06 15:31           ` Davide Mancusi
@ 2015-11-06 15:34             ` Tomi Ollila
  2015-11-06 15:37               ` Davide Mancusi
  0 siblings, 1 reply; 10+ messages in thread
From: Tomi Ollila @ 2015-11-06 15:34 UTC (permalink / raw)
  To: Davide Mancusi, notmuch

On Fri, Nov 06 2015, Davide Mancusi <arekfu@yahoo.it> wrote:

> 2015-11-06 16:24 GMT+01:00 Tomi Ollila <tomi.ollila@iki.fi>:
>> And notmuch config get database.path prints /export/home/username/mail
>> I presume ?
>
> Correct.
>
>> If that is the case then this symlink should have no effect.
>>
>> Is there any symlinks inside /export/home/username/mail
>> ( find /export/home/username/mail -type l ) (provided that
>> was the database.path -- and sure there are no bind mounts ;D?)
>
> No symlinks and no bind mounts.

Ah, so path /export/home/username/mail//home/username/local/mail/archive/cur/1446805732.2711_9.hostname:2,S

does not exist? It probably used to be (?) (via some long-gone symlink?)
and now it is just garbage in the database (that does not go away)...?

>
> Cheers,
> Davide

Tomi

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

* Re: weird paths in notmuch database
  2015-11-06 15:34             ` Tomi Ollila
@ 2015-11-06 15:37               ` Davide Mancusi
  2015-11-12 16:24                 ` Davide Mancusi
  0 siblings, 1 reply; 10+ messages in thread
From: Davide Mancusi @ 2015-11-06 15:37 UTC (permalink / raw)
  To: notmuch; +Cc: Davide Mancusi

2015-11-06 16:34 GMT+01:00 Tomi Ollila <tomi.ollila@iki.fi>:
> Ah, so path /export/home/username/mail//home/username/local/mail/archive/cur/1446805732.2711_9.hostname:2,S
>
> does not exist? It probably used to be (?) (via some long-gone symlink?)
> and now it is just garbage in the database (that does not go away)...?

No, it never existed. I'm positive about that.

...however, I just noticed that my muttrc config contains

set folder="/home/username/local/mail"

Maybe mutt-kz is screwing up things when it calls notmuch internally?

Davide

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

* Re: weird paths in notmuch database
  2015-11-06 15:37               ` Davide Mancusi
@ 2015-11-12 16:24                 ` Davide Mancusi
  0 siblings, 0 replies; 10+ messages in thread
From: Davide Mancusi @ 2015-11-12 16:24 UTC (permalink / raw)
  To: notmuch

2015-11-06 16:37 GMT+01:00 Davide Mancusi <arekfu@yahoo.it>:
> 2015-11-06 16:34 GMT+01:00 Tomi Ollila <tomi.ollila@iki.fi>:
>> Ah, so path /export/home/username/mail//home/username/local/mail/archive/cur/1446805732.2711_9.hostname:2,S
>>
>> does not exist? It probably used to be (?) (via some long-gone symlink?)
>> and now it is just garbage in the database (that does not go away)...?
>
> No, it never existed. I'm positive about that.
>
> ...however, I just noticed that my muttrc config contains
>
> set folder="/home/username/local/mail"
>
> Maybe mutt-kz is screwing up things when it calls notmuch internally?

For the record, I ended up dumping and restoring the database. That
got me rid of the non-existing paths.

Davide

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

end of thread, other threads:[~2015-11-12 16:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-06 10:57 weird paths in notmuch database Davide Mancusi
2015-11-06 13:09 ` David Bremner
2015-11-06 13:23   ` Davide Mancusi
2015-11-06 15:14     ` Tomi Ollila
2015-11-06 15:17       ` Davide Mancusi
2015-11-06 15:24         ` Tomi Ollila
2015-11-06 15:31           ` Davide Mancusi
2015-11-06 15:34             ` Tomi Ollila
2015-11-06 15:37               ` Davide Mancusi
2015-11-12 16:24                 ` Davide Mancusi

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).