"5.11. /var/mail : User mailbox files (optional) 5.11.1. Purpose The mail spool must be accessible through /var/mail and the mail spool files must take the form <username>. [44] User mailbox files in this location must be stored in the standard UNIX mailbox format. Rationale The logical location for this directory was changed from /var/spool/mail in order to bring FHS in-line with nearly every UNIX distribution. This change is important for inter-operability since a single /var/mail is often shared between multiple hosts and multiple UNIX distribution (despite NFS locking issues). It is important to note that there is no requirement to physically move the mail spool to this location. However, programs and header files must be changed to use /var/mail." https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varmailUserMailboxFiles The following packages need changes: qgrep "/var/spool/mail" mail-filter/procmail/procmail-3.22-r15.ebuild: echo '# Use mbox-style mailbox in /var/spool/mail' > "${S}"/procmailrc || die mail-filter/procmail/procmail-3.22-r15.ebuild: echo 'DEFAULT=${EPREFIX}/var/spool/mail/$LOGNAME' >> "${S}"/procmailrc || die net-mail/mailutils/mailutils-3.14-r1.ebuild: --with-mail-spool=/var/spool/mail \ net-mail/mailutils/mailutils-3.13-r1.ebuild: --with-mail-spool=/var/spool/mail \ net-mail/mailutils/mailutils-3.12-r4.ebuild: --with-mail-spool=/var/spool/mail \ mail-client/mutt/mutt-2.2.1.ebuild: myconf+=( "--with-mailpath=${EPREFIX}/var/spool/mail" ) mail-client/mutt/mutt-2.2.2.ebuild: myconf+=( "--with-mailpath=${EPREFIX}/var/spool/mail" ) mail-client/mutt/mutt-2.0.7.ebuild: myconf+=( "--with-mailpath=${EPREFIX}/var/spool/mail" ) mail-client/s-nail/s-nail-14.9.22.ebuild: VAL_MAIL='/var/spool/mail' mail-client/s-nail/s-nail-14.9.24.ebuild: VAL_MAIL='/var/spool/mail' acct-user/mail/mail-0-r1.ebuild:ACCT_USER_HOME=/var/spool/mail acct-user/postmaster/postmaster-0-r1.ebuild:ACCT_USER_HOME=/var/spool/mail mail-mta/opensmtpd/opensmtpd-6.8.0_p2-r1.ebuild: --with-path-mbox=/var/spool/mail \ mail-mta/postfix/postfix-3.7.0-r1.ebuild: mypostconf="mail_spool_directory=/var/spool/mail" mail-mta/postfix/postfix-3.8_pre20220407.ebuild: mypostconf="mail_spool_directory=/var/spool/mail" mail-mta/postfix/postfix-3.6.5-r2.ebuild: mypostconf="mail_spool_directory=/var/spool/mail" Reproducible: Always
> It is important to note that there is no requirement to physically move the mail spool to this location. However, programs and header files must be changed to use /var/mail." Sounds like we should just symlink /var/mail to /var/spool/mail.
(In reply to Mike Gilbert from comment #1) > Sounds like we should just symlink /var/mail to /var/spool/mail. and we do via net-mail/mailbase (In reply to Jonas Stein from comment #0) > However, programs and header files must be > changed to use /var/mail." Noted. OK.
(In reply to Mike Gilbert from comment #1) > Sounds like we should just symlink /var/mail to /var/spool/mail. Or the other way around? What is the advantage of having it in /var/spool/mail, other than backwards compatibility?
(In reply to Ulrich Müller from comment #3) It's easier/safer to create a symlink than to move data.
(In reply to Mike Gilbert from comment #4) > It's easier/safer to create a symlink than to move data. Right. That's the backwards compatibility argument (and probably it doesn't matter much which way around the symlink is). (In reply to Jonas Stein from comment #0) > This change is important for inter-operability since a single /var/mail is > often shared between multiple hosts and multiple UNIX distribution (despite > NFS locking issues). I wonder how many people do that in 2022. :)
The symlink direction matters for existing systems that already have data stored in /var/spool/mail. The data would need to moved somehow before the symlink is created at /var/spool/mail.
(In reply to Mike Gilbert from comment #6) > The symlink direction matters for existing systems that already have data > stored in /var/spool/mail. The data would need to moved somehow before the > symlink is created at /var/spool/mail. I don't think that we actually disagree here. For the functionality, it doesn't matter if we have /var/mail -> spool/mail or /var/spool/mail -> ../mail, and backwards compatibility prefers the former.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c47ea1f2cf76cd9ef093eea23c795a109dd4e4ca commit c47ea1f2cf76cd9ef093eea23c795a109dd4e4ca Author: Eray Aslan <eras@gentoo.org> AuthorDate: 2022-04-22 08:29:56 +0000 Commit: Eray Aslan <eras@gentoo.org> CommitDate: 2022-04-22 08:36:00 +0000 mail-mta/postfix: add 3.8_pre20220421, drop 3.8_pre20220417 configure mail_spool_directory as /var/mail instead of /var/spool/mail Bug: https://bugs.gentoo.org/837707 Signed-off-by: Eray Aslan <eras@gentoo.org> mail-mta/postfix/Manifest | 2 +- ...stfix-3.8_pre20220417.ebuild => postfix-3.8_pre20220421.ebuild} | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-)