[notmuch] Notmuch doesn't index new mails when mail location contains symlinks

Jed Brown jed at 59A2.org
Mon Nov 23 07:16:58 PST 2009


On Mon, 23 Nov 2009 16:01:41 +0100, Tassilo Horn <tassilo at member.fsf.org> wrote:
> Tassilo Horn <tassilo at member.fsf.org> writes:

> I don't have to touch the symlinks or the directories inside the
> locations the symlinks point to, but instead I have to touch the
> top-level directory where the symlinks are contained in.

Ah, it's slightly more subtle.  Notmuch correctly uses stat() instead of
lstat() to check whether the link target changed.  However, mtime for
your mail root directory (containing the symlinks) does not get updated
when the target of the symlinks is updated.  I think the only way to fix
this is to replace the current search (which skips a directory as soon
as it's mtime is older than the database) with one that enters all
directories so that symlinks are actually followed.

Jed


More information about the notmuch mailing list