Subject: Re: Location of Mail Directory
To: Curt Sampson <>
From: Chris G. Demetriou <cgd@postgres.Berkeley.EDU>
List: current-users
Date: 04/05/1994 17:02:41
> I'm running the March 25th binaries. The tar files extracted a
> /var/mail directory but not a /var/spool/mail. Mail.local puts new
> mail in /var/mail and biff checks for it there, but the shell, from
> and mailx all believe it should be in /var/spool/mail.

you are confused.   /var/mail is, and always has been the place where
mail is stored, in NetBSD.

the fact that you say "the shell believes..." makes me think you
incorrectly set your 'MAIL' environment variable.  most mail-using
programs look at the MAIL environment variable, but it's not set by
anybody but the user.

from the from sources:

         * We find the mailbox by:
         *      1 -f flag
         *      2 user
         *      2 MAIL environment variable
         *      3 _PATH_MAILDIR/file

_PATH_MAILDIR is /var/mail.

from the mail source code:

findmail(user, buf)
        char *user, *buf;
        char *mbox;
        if (!(mbox = getenv("MAIL")))
                (void)sprintf(buf, "%s/%s", _PATH_MAILDIR, user);
                (void)strcpy(buf, mbox);