On 2020-05-11 20:38:19 +0200, Steffen Nurpmeso wrote: > Vincent Lefevre wrote in > <20200510204809.ga71...@zira.vinc17.org>: > |Related to commit 7bd57bc3c24adf97f1f57bd6bb2fd18347f8cbbd, is > |dotlocking still used nowadays? > > I find yes. Or at least last i looked, some MTAs aka MDA or > whatever the right name is (LDA? postfix > (configurable), i think OpenBSDs mail.local (which saw heavy > modifications lately though)) create these files,
OK, but it seems that all of them support fcntl locking. Under Debian, procmail, postfix and exim seem to use both by default. Concerning procmail, it is provided with a setgid /usr/bin/lockfile. For postfix, its documentation says: Note: The dotlock method requires that the recipient UID or GID has write access to the parent directory of the mailbox file. So it seems that dotlocking does not always work. > and then i think it seems sensible to embed in this locking > strategy. That is what i use for my MUA, though on OpenBSD, MacOS > and some others (Fedora at least) OPT_DOTLOCK is disabled, and on > Debian the maintainer has made the dotlock helper a SETGID instead > of a SETUID program, which should be enough for the plain Debian > mailspool, however. Yes, because the group can write into it: drwxrwsr-x 2 root mail 4096 2020-05-10 22:22:08 /var/mail/ Now, even if dotlocking isn't dropped, I don't think that it should be mandatory. IMHO, * one should be able to specify the location of the dotlock program at run time (so that non-root users could install a more recent version of Mutt in their home directory); * one should be able to use dotlocking in an optional way, i.e. just as an additional security, in addition to fcntl: if there is no sufficient directory permission to create a lock file, then ignore dotlocking and just rely on fcntl (which should be fine for most users). -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)