the following comment is from src/transports/appendfile.c
MBX LOCKING
If use_mbx_lock is set (this is supported only if SUPPORT_MBX is defined)
then the rules used for locking in c-client are used. Exim takes out a shared
lock on the mailbox file, and an exclusive lock on the file whose name is
/tmp/.<device-number>.<inode-number>. The shared lock on the mailbox stops
any other MBX client from getting an exclusive lock on it and expunging it.
It also stops any other MBX client from unlinking the /tmp lock when it has
finished with it.
the problem is that the shared lock on the mailbox file deny the next writing op to the mailbox in CYGWIN. A permission denied error will occur during copy_mbx_message call becuase of the shared lock.
and i think the shared lock doen't make sense, it should be a exclusive lock. maybe the shared lock behave well in linux or other OS, but how about if the filesystem is mounted with mandatory locking? i'm not familar with linux, and i'm just wondering.