Bug 4465 - mail -u doesn't find the correct mailbox file
Summary: mail -u doesn't find the correct mailbox file
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mailx
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-08-10 18:47 UTC by fwx
Modified: 2008-05-01 15:37 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 1999-08-10 19:00:39 UTC


Attachments (Terms of Use)

Description fwx 1999-08-10 18:47:56 UTC
After an su root, I run "/bin/mail -u root" to check for
any mail that has arrived for root.  It doesn't find any,
and reports "No mail for root".  However, I can see that
there is mail in root's mailbox
file, /var/spool/mail/root.  Furthermore,
running "/bin/mail -f /var/spool/mail/root" allows me to
access it.  The problem here is that "mail -u user" is
(according to the man page) supposed to be eqivalent
to "mail -f /var/spool/mail/user".  It obviously is not
working correctly.

Comment 1 Jeff Johnson 1999-08-10 19:00:59 UTC
Your USER environment variable is not changed when you do "su root".
Do "su - root" instead.


Note You need to log in before you can comment on or make changes to this bug.