bug report: lmtp fails on root-squashed NFS filesystem

Anne Bennett anne at encs.concordia.ca
Tue Nov 23 21:47:46 UTC 2021


Following up to my own post:

> I'm trying to set up Postfix with dovecot LTMP delivery
> on a host where the user files (/var/spool/mail as well as
> home directories) are on NFS filesystems, which are exported
> root-squashed to the mail server.

[LMTP delivery fails with "save failed to INBOX: Read-only mbox"]

> I found this posting where someone else had a similar problem
> and traced it in some detail back in 2019:
>
>   https://dovecot.org/list/dovecot/2019-February/114611.html
>
> but apparently no one answered the fellow.

However, he was definitely on the right track, that is, file
access was (incorrectly) checked as root, using "access()",
instead of as the target user, using "euidaccess()".

I patched "src/lib-storage/index/mbox/mbox-storage.c" and
"src/lib-storage/index/maildir/maildir-storage.c" to replace
calls to "access()" with calls to "euidaccess()", and now mail
delivery (to mboxes) works for me.  (I can't test maildir yet.)

Could this be considered for a patch to future versions, please?



Anne.
-- 
Ms. Anne Bennett, Senior Sysadmin, ENCS, Concordia University, Montreal H3G 1M8
anne at encs.concordia.ca                                    +1 514 848-2424 x2285


More information about the dovecot mailing list