Subject: Re: Location of Mail Directory
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: - Greg Earle <earle@isolar.Tujunga.CA.US>
List: current-users
Date: 04/05/1994 18:54:57
>trinity# from
>from: can't read /var/mail/root
>trinity#
>
>And, looking at the code, it's certainly doing the right thing.  Under
>386BSD and NetBSD, the mail directory has always been /var/mail.

Speaking of mail ...

netbsd4me:1:40 % ls -lt /var/mail
total 82
-rw-------  1 root  wheel  41500 Apr  5 02:07 root
netbsd4me:1:41 % su
Password:
netbsd4me:1 # from
from: can't read /var/mail/earle.

OK.

netbsd4me:3 # from root
from: can't read /var/mail//var/mail.

Huh?

netbsd4me:4 # Mail
No mail for earle
netbsd4me:5 # Mail -u root
No mail for root

Hmmn ...

netbsd4me:6 # ktrace Mail -u root
No mail for root

netbsd4me:7 # kdump
...
   340 Mail     NAMI  "/etc/mail.rc"
...
   340 Mail     NAMI  "/root/.mailrc"
...
   340 Mail     CALL  open(0x25100,0,0x1b6)
   340 Mail     NAMI  "/var/mail/earle"
                      ^^^^^^^^^^^^^^^^	Whoops
   340 Mail     RET   open -1 errno 2 No such file or directory
   340 Mail     CALL  write(0x2,0xf7ffef78,0x11)
   340 Mail     GIO   fd 2 wrote 17 bytes
       "No mail for root
       "
   340 Mail     RET   write 17/0x11
   340 Mail     CALL  exit(0x1)

netbsd4me:8 # Mail -f /var/mail/root
Mail version 5.5 6/1/90.  Type ? for help.
"/var/mail/root": 14 messages 14 new

Mail(1) says:

     -u    Is equivalent to:

                 mail -f /var/mail/user

I took a look at /usr/src/usr/bin/mail but didn't find any obvious reason why.

	- Greg


------------------------------------------------------------------------------