SUMMARY: How to change default mail file?

From: Stuart Myles (
Date: Thu Jun 03 1993 - 18:19:20 CDT

Dear SM,

Original question:

I want a user to log in with one username, "userA", but only be able to read the
mail of "userB" NOT "userA"...


I eventually wrote a script which allows userA to su to userB and run mailtool.
(I've included it at the end, for those who are interested). This works better
than changing the MAIL variable or running elm (et al) with a specific folder,
because it is important that mail _originates_ with userB. That way, when
people reply to mail messages it uses the desired username. Nobody suggested
exactly this solution, but everyone's comments helped me get there.

Thanks for all the replies (ranging from the patient to the incredulous): raoul@Athena.MIT.EDU clive@asis.unimelb.EDU.AU

----------------- Cut Here ------------------------------------------------
# usage: readmail <username>
# Read the mail of the given user

if [ $# -lt 1 ]
        echo "`basename $0`: You must specify a user name"
        exit 1

# Give the user permission to run an X app on this host

xhost +`hostname` + $1@ 2>&1 > /dev/null

# Run the mailtool, prompting for the user's password in the process

su - $1 -c /usr/openwin/bin/mailtool

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:54 CDT