SUMMARY: How to change default mail file?

From: Stuart Myles (stuart@mtb.phil.mop.com)
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"...

Solution:

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):

glenn@uniq.com.au Robert.Evans@cm.cf.ac.uk
shandelm@jpmorgan.com mikem@ll.mit.edu
lem@shaddam.usb.ve mharris@jpmorgan.com
bert@penril.com raoul@Athena.MIT.EDU
glenns@sa-cgy.valmet.com anderson@neon.mitre.org
macelis@neb.com clive@asis.unimelb.EDU.AU

Stuart.
----------------- Cut Here ------------------------------------------------
#!/bin/sh
#
# usage: readmail <username>
#
# Read the mail of the given user

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

# 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