Ian Zimmerman writes: > On 2015-08-28 02:14 +0200, Suvayu Ali wrote: > >> No, it's not. AFAIK on most (all?) *nix filesystems, basic operations >> are atomic. See for example this (outdated) list: >> >> http://rcrowley.org/2010/01/06/things-unix-can-do-atomically.html >> >> E.g., this breaks down when you talk about network mounts like NFS (not >> sure about SSHFS), but it is a valid assumption as long as your storage >> is local. > > Assume there's a message ~/Mail/inbox/cur/1440718280.10956_2.ahiker:2,S > > MUA 1 wants to set the "tagged" flag, which means renaming > > 1440718280.10956_2.ahiker:2,S -> 1440718280.10956_2.ahiker:2,FS > > MUA 2 wants to set the "replied" flag, which means renaming > > 1440718280.10956_2.ahiker:2,S -> 1440718280.10956_2.ahiker:2,RS > > Only one of them can succeed, depending on the order they try. And > final state also depends on that order. Interesting discussion - and I am learning that I do not know enough to say that there *can* be race conditions, but I know that they are *bad* when they occur and can lead to corruption or undefined behavior. And I also know that I do not want this, particularly not in email. So using dovecot to RW access the maildir is the safe way to go. Notmuch is also accessing the maildir directly, but only read-only. Cheers, Rainer -- Rainer M. Krug email: Rainerkrugsde PGP: 0x0F52F982