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

Summary: mail -u doesn't find the correct mailbox file
Product: [Retired] Red Hat Linux Reporter: fwx
Component: mailxAssignee: David Lawrence <dkl>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-08-10 19:00:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.