You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried locating the base path for $MAIL. Grepping nixpkgs yields nothing. Grepping bash sources indicates that there is a ./configure variable called bash_cv_mail_dir that can be set. The weird part is that this variable gets initialized like this:
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default mail directory" >&5
$as_echo_n "checking for default mail directory... " >&6; }
if ${bash_cv_mail_dir+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -d /var/mail; then
bash_cv_mail_dir=/var/mail
elif test -d /var/spool/mail; then
bash_cv_mail_dir=/var/spool/mail
elif test -d /usr/mail; then
bash_cv_mail_dir=/usr/mail
elif test -d /usr/spool/mail; then
bash_cv_mail_dir=/usr/spool/mail
else
bash_cv_mail_dir=unknown
fi
fi
So I would actually expect it to be set to "unknown", given that hydra (and I) build packages in chroots.
Anyway, I see three ways to solve this:
build bash with MAIL=/var/spool/mail
add /var/mail -> /var/spool/mail symlink in NixOS
change NixOS/postfix mail path from /var/spool/mail to /var/mail
I'm not sure what you mean by "$MAIL points to /var/mail". $MAIL is undefined on my NixOS system. No variable in my declare -p environment mentions neither /var/mail nor /var/spool/mail. To me, it looks more likely that mutt has that default path compiled in; I don't believe bash has anything to do with that.
What? You don't have $MAIL environment variable at all?
$ echo $MAIL
/var/mail/bfo
AFAICS, it is bash that has the compiled in $MAIL pointing to /var/mail/*.
After thinking about this for a bit, I guess the /var/mail -> /var/spool/mail symlink is the best option. Then we are the most compatible and don't have to rebuild anything.
Workaround, run your MUA like this:
MAIL=/var/spool/mail/$USER mutt
I tried locating the base path for $MAIL. Grepping nixpkgs yields nothing. Grepping bash sources indicates that there is a ./configure variable called
bash_cv_mail_dir
that can be set. The weird part is that this variable gets initialized like this:So I would actually expect it to be set to "unknown", given that hydra (and I) build packages in chroots.
Anyway, I see three ways to solve this:
Data point: FHS actually recommends /var/mail:
http://www.pathname.com/fhs/pub/fhs-2.3.html#VARMAILUSERMAILBOXFILES
The text was updated successfully, but these errors were encountered: