Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 4465 - mail -u doesn't find the correct mailbox file
Summary: mail -u doesn't find the correct mailbox file
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mailx
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-08-10 18:47 UTC by fwx
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
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.