Bug 4465 - mail -u doesn't find the correct mailbox file
mail -u doesn't find the correct mailbox file
Product: Red Hat Linux
Classification: Retired
Component: mailx (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
Depends On:
  Show dependency treegraph
Reported: 1999-08-10 14:47 EDT by fwx
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-08-10 15:00:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description fwx 1999-08-10 14:47:56 EDT
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 15:00:59 EDT
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.