|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: mail command deletes all mail?
From: Marcus Watts (mdw
umich.edu)
Date: Tue Apr 01 2003 - 10:47:21 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Date: Tue, 1 Apr 2003 09:12:59 -0500
> From: Rob <rbb-obsd
dog-slow.org>
> To: misc
openbsd.org
> Subject: mail command deletes all mail?
> Message-ID: <20030401141259.GA56456
ringo.dog-slow.org>
> Mime-Version: 1.0
>
> OK, this befuddles me completely. Is this proper behavior for the
> mail command?
>
> $ echo $MAIL
> /home/bringman/mbox
> $ ls -al /home/bringman/mbox
> ls: /home/bringman/mbox: No such file or directory
> $ mail bringman
> Subject: testing
> alsjkdf
> .
> EOT
> $ ls -al /home/bringman/mbox
> -rw------- 1 bringman users 429 Apr 1 09:23 /home/bringman/mbox
> $ mail
> Mail version 8.1.2 01/15/2001. Type ? for help.
> "/home/bringman/mbox": 1 message 1 new
> >N 1 bringman
red.insi Tue Apr 01 14:22 12/429 testing
> & 1
> Message 1:
> >From bringman
red.inside.dog-slow.org Tue Apr 01 14:22:50 2003
> Delivered-To: bringman
red.inside.dog-slow.org
> From: bringman
red.inside.dog-slow.org
> To: bringman
red.inside.dog-slow.org
> Subject: testing
>
> alsjkdf
>
> & q
> Saved 1 message in mbox
> $ ls -al /home/bringman/mbox
> ls: /home/bringman/mbox: No such file or directory
> $
>
>
> What happend to my mailbox?
>
> --
> Rob
>
>
The mail program wants to archive mail in "mbox", and thinks that your
incoming mail goes somewhere else (like /var/spool/mail/$LOGIN). When
you quit out of mail, it copied the mail that you had read into mbox,
then truncated your incoming mail. Since you had told it your incoming
mail went to "mbox", the result was that it threw away the mail it had just
"saved". Clearly, a failure of the "read_user_mind(3)" library call
everybody thinks is built into the system, especially around April 1st.
Probably you don't want to deliver mail to "~/mbox", if you use mailx.
Maybe ~/inbox instead? Perhaps mailx should check to see if
mbox == $MAIL, but it's not clear what it should do if that
should be true.
-Marcus Watts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]