Consider following configuration in [database] section:
[database]
path=mail/main
With notmuch 0.32 running:
$ notmuch config list | grep database
database.backup_dir=/home/miro/mail/main/.notmuch/backups
database.hook_dir=/home/miro/mail/main/.notmuch/hooks
database.mail_root=mail/main
database.path=mail/main
It seem OK. Notice that backup_dir and hook_dir are absolute paths and
resolved correctly.
Running:
$ notmuch count
6454
All good!
Running:
$ notmuch new
...
Unexpected error with file mail/main/INBOX/cur/1615663870.253649_51.mirci,U=36739:2,S
add_file: Something went wrong trying to read or write a file
Error opening mail/main/INBOX/cur/1615663870.253649_51.mirci,U=36739:2,S: No such file or directory
...
Not good!
Setting database.path to an absolute path is a working workaround.
It seems that while notmuch can determine the correct location of the
database, when in need to access actual emails it fails. Coinciding with
the introduction of database.mail_root it seems that it's not
interpreted the same way when set (or "inherited" from database.path) as
relative value.
--
Miroslav Koškár
http://mkoskar.com/