Hi Oswald. I am playing with mbsync (version isync-1.3.0-1 from Debian distro) in order to create some mirroring service for users of my company, and consider Maildir folders as most convinient data structure. Some peculiarity is that users can create folders with names "cur", "new" and "tmp", which could conflict with Maildir structure. I tried this config:
------------------------------------------------------------------------ IMAPStore master <blah-blah...> MaildirStore local Inbox /some/path/mbsync-store Path /some/path/mbsync-store/ SubFolders Verbatim Channel main Master :master: Slave :local: Patterns * !new !cur !tmp ------------------------------------------------------------------------ The caveats I found are: 1. When user creates subfolder "new" on the IMAP master tree, command "mbsync -c ~/mbsyncrc -a -V --pull --create" also creates its replica regardless of presence "!new" on Patterns. Output has: Opening master box test123/new... Opening slave box test123/new... Creating slave test123/new... Maildir notice: no UIDVALIDITY, creating new. Why "!new" was not applied? Is it a bug in pattern handling? 2. On the second run the same "mbsync -c ~/mbsyncrc -a -V --pull --create" consider recently created directories as mails, and assign them UIDs: ------------------------------------------------------------------------ ~/mbsync-store % ls -al test123/new total 28 drwx------ 5 berd zp 4096 Jul 29 13:16 . drwx------ 6 berd zp 4096 Jul 29 13:16 .. -rw-r--r-- 1 berd zp 94 Jul 29 13:15 .mbsyncstate -rw------- 1 berd zp 13 Jul 29 13:15 .uidvalidity drwx------ 2 berd zp 4096 Jul 29 13:15 'cur,U=8' drwx------ 2 berd zp 4096 Jul 29 13:15 'new,U=9' drwx------ 2 berd zp 4096 Jul 29 13:15 'tmp,U=10' ~/mbsync-store % cat test123/new/.mbsyncstate MasterUidValidity 1532859325 SlaveUidValidity 1532859353 MaxPulledUid 1 MaxPushedUid 0 1 1 S ------------------------------------------------------------------------ I think mbsync should always check for file attributes in order to skip non-plain files (directories, sockets, pipes and so on), at least check for "new", "cur" and "tmp" under Maildirs (to reduce number of syscalls). Probably such check also solves the problem with name clashing at all, and everyone could use "Patterns *" without "!new !cur !tmp". -- Eugene Berdnikov ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel