Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

should ignore symlinks in "mailboxes" #5

Open
anarcat opened this issue Apr 25, 2018 · 3 comments
Open

should ignore symlinks in "mailboxes" #5

anarcat opened this issue Apr 25, 2018 · 3 comments

Comments

@anarcat
Copy link
Contributor

anarcat commented Apr 25, 2018

I use notmuch to index my mails. This means that in my Maildir folder, there is a Maildir/.notmuch/hooks/ subfolder which has various programs that run before and after notmuch is ran. To version-control that stuff, I use symlinks, so things look like this:

[264]anarcat@curie:syncmaildir$ ll ~/Maildir/.notmuch/hooks/
total 0
lrwxrwxrwx 1 anarcat anarcat 29 2017-01-04 22:51 post-new -> /home/anarcat/bin/notmuch-tag*
lrwxrwxrwx 1 anarcat anarcat 31 2017-01-04 22:51 pre-new -> /home/anarcat/bin/notmuch-purge*

When smd-check-conf finds this folder, it freaks out:

Remote mailboxes translated to local and back:
error [stat]: Maildir/.notmuch/hooks/pre-new in not a directory
Error while listing the content of Maildir, skipping
Endpoint default configuration file successfully checked

I don't think it should freak out like that - those files should just be ignored out of the box. Naturally, I can easily make smd ignore those files with:

EXCLUDE="Maildir/.notmuch/hooks/* Maildir/.notmuch/xapian/*"

I'm not sure I need to ignore the Xapian folder as well, but it seems safer.

@gares
Copy link
Owner

gares commented Apr 26, 2018

You are definitely right

@gares
Copy link
Owner

gares commented Apr 26, 2018

Before fixing the bug I want to improve https://github.com/gares/syncmaildir/blob/master/tests.d/mddiff/06-listing-folders

I have some troubles reproducing your bug, since it seems your configuration is such that mddiff is
called as follows: mddiff -l GoodDirectory SymlinkToANonDirectory. Looking at https://github.com/gares/syncmaildir/blob/master/smd-check-conf#L59 . Can you confirm the value of your MAILBOX_LOCAL variable?

@anarcat
Copy link
Contributor Author

anarcat commented Apr 26, 2018

i must admit i also had trouble reproducing this while filing this bug report. it sometimes happens, sometimes not, and it's unclear to me when...

right now i have this:

MAILBOX_LOCAL=Maildir-smd/
MAILBOX_REMOTE=Maildir/

... but before it was:

MAILBOX_LOCAL=Maildir/Anarcat/
MAILBOX_REMOTE=Maildir/

In both cases, the notmuch directory is in Maildir/.notmuch, in remote and local. Now that I use Maildir-smd however, there's no .notmuch directory there but there will be when i move that folder back in Maildir/Anarcat.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants