Symlinked mailboxes and dovecot-uidlist.lock

Dave dave at momentumweb.com
Tue May 7 21:07:20 EEST 2019


I have a scenario where I have two users, one account (user1) with it's 
own Maildir account, and another account (user2) (which I wish to see 
the same messages) with a symlinked Maildir to user1's Maildir.  I.E.:

/home/user1/Maildir
/home/user2/Maildir (where this Maildir is symlinked to /home/user1/Maildir)

Both users are in a group together (usergroup), and so all of the 
permissions on the Maildir, new, cur, etc folders are rwxrwx--- or 
rw-rw----.  All mail gets created and delivered correctly, both users 
can move and create files, and everything generally seems to be working 
fine.  However, I did notice one error showing up in the system logs:

May 2 11:35:13 userserver dovecot: imap(user1): Error: 
inotify_add_watch(/home/user1/Maildir/dovecot-uidlist.lock) failed: 
Permission denied
May 2 11:36:27 userserver dovecot: imap(user2): Error: 
inotify_add_watch(/home/user2/Maildir/dovecot-uidlist.lock) failed: 
Permission denied
May 3 10:10:11 userserver dovecot: imap(user2): Error: 
inotify_add_watch(/home/user2/Maildir/.Folder1/dovecot-uidlist.lock) 
failed: Permission denied

I've managed to catch a glimpse of a lock file, as it comes and goes 
very quickly, and it is permissioned as so:

-rw-rw----  1 user1 usergroup       10 May  5 11:39 dovecot-uidlist.lock

So I'm not sure what exactly the permissions issue is then?  The file 
seems to have the appropriate group permissions for each user to read 
from and write to it.

Again, this is the only error I'm getting, and everything has been 
working fine.  I did read the Dovecot wiki talking about symlinking 
mailboxes, and it refers to symlinking each box/folder individually and 
not the entire Maildir folder as I've done, but since each individual 
box/folder has its own dovecot-uidlist I imagine I might run into this 
same issue anyway?  Anyway, I'd like to squelch the error if I can, so 
are there any thoughts as to why the lock files are having trouble with 
inotify_add_watch?

-Dave



More information about the dovecot mailing list