[comp.mail.elm] where are the defaults for new users stored?

ldg@amy.skidmore.edu (06/22/91)

We're a relatively new site both to Unix and elm...

When we did our make on elm earlier this year, we chose vi as the default
editor.  Now that we have emacs up and runnning, I'd like to change elm
to be preset to emacs for all new accounts.

Is there a prototype file that elm uses when it builds the .elmrc file for 
new users or is this hard coded into the program itself?

Quite obviously, I'd prefer to edit a prototype rather than go back and 
re-make the elm binaries.  While make is not very difficult, who needs the 
extra work.

Thanks,

===================================================================
Leo D. Geoffrion                  
Associate Director for             NYNEX:  (518) 584-5000 Ext. 2628
Academic Computing                BITNET:  LDG@SKIDMORE 
Skidmore College                Internet:  LDG@AMY.SKIDMORE.EDU
Saratoga Springs, NY  12866          
===================================================================

adeboer@gjetor.geac.COM (Anthony DeBoer) (06/24/91)

In article <1164.2862670e@amy.skidmore.edu> ldg@amy.skidmore.edu writes:
>When we did our make on elm earlier this year, we chose vi as the default
>editor.  Now that we have emacs up and runnning, I'd like to change elm
>to be preset to emacs for all new accounts.
>
>Is there a prototype file that elm uses when it builds the .elmrc file for 
>new users or is this hard coded into the program itself?
>
>Quite obviously, I'd prefer to edit a prototype rather than go back and 
>re-make the elm binaries.  While make is not very difficult, who needs the 
>extra work.

Most of that stuff is hardcoded into the elm binary, so it's probably
re-configure and re-make time...

And yes, it would be nice if there was a "standard" elmrc file (less one or
two parameters like "fullname"!) in /usr/local/lib or whereever, that the
sysadmin could set up with defaults and that elm would read if
$HOME/.elm/elmrc didn't exist.

The other side of the coin, of course, is educating the users on how to use
the editor you set up as the default.  The simple-editor thread in this
newsgroup now is hashing over some of these issues, but basically you do need
an editor-for-idiots brought up as a default, and make it clear to the users
that they can tell it to use their favorite editor instead.  Of course, if
everyone in your shop has to know vi or emacs or Wordperfect anyway, you can
set that up as the default, but you could be putting yourself in a position
where you have to do a lot of (in your case) emacs training.  Anyway, that's
just a few words from experience.  Your own mileage will probably vary.
-- 
Anthony DeBoer  NAUI#Z8800                             adeboer@gjetor.geac.com
Geac Canada Ltd., Toronto                             uunet!geac!gjetor!adeboer

silvert@cs.dal.ca (Bill Silvert) (06/25/91)

In article <1991Jun24.145647.1723@gjetor.geac.COM> adeboer@gjetor.geac.COM (Anthony DeBoer) writes:
>>When we did our make on elm earlier this year, we chose vi as the default
>>new users or is this hard coded into the program itself?
>>
>>Quite obviously, I'd prefer to edit a prototype rather than go back and 
>>re-make the elm binaries.  While make is not very difficult, who needs the 
>>extra work.
>
>And yes, it would be nice if there was a "standard" elmrc file (less one or
>two parameters like "fullname"!) in /usr/local/lib or whereever, that the
>sysadmin could set up with defaults and that elm would read if
>$HOME/.elm/elmrc didn't exist.
>

I've avoided this problem by setting up standard prototypes which can be
edited with sed automatically to configure elm for new users.  Check the
following files carefully before using, since they are configured for my
system and have paths hardwired into them.  Also note that my system
group has permissions on the files, which simplifies administration but
can also be viewed as a security compromise.

------------------- cut here ---------------------

#!/bin/sh
# This is a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 06/25/1991 12:45 UTC by sysop@biome
# Source directory /usr/local/bin
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#   1717 -rwxr--r-- elmsetup
#      9 -rw-rw-r-- Local
#    240 -rw-rw-r-- Remote
#     42 -rw-rw-r-- elmheaders
#   4005 -rw-rw-r-- elmrc
#
# ============= elmsetup ==============
if test -f 'elmsetup' -a X"$1" != X"-c"; then
	echo 'x - skipping elmsetup (File already exists)'
else
echo 'x - extracting elmsetup (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'elmsetup' &&
#!/bin/sh
# Shell script elmsetup created Fri Apr 19 10:11:34 ADT 1991 by sysop
PROG=`basename $0`
SOURCE=/usr/local/lib/elm
SEDF=/usr/tmp/elm.sed.$$
OVERWRITE=ask
GROUP=system
OPTIONS=hfg:n
USAGE="Usage: $PROG [-$OPTIONS] user [...]"
while getopts $OPTIONS x
do
X	case $x in
X	n)	OVERWRITE=never ;;
X	f)	OVERWRITE=yes ;;
X	g)	GROUP=$OPTARG ;;
X	h)	echo "$USAGE" ; exit 1 ;;
X	\?)	echo "$USAGE" ; exit 1 ;;
X	*)	echo "$USAGE" ; exit 1 ;;
X	esac
done
shift `expr $OPTIND - 1`
X
case $# in
0)      echo "$USAGE" ; exit 2 ;;
*)
X	for i
X	do
X		USER=`basename $i`
X		LINE=`grep "^$USER:" /etc/passwd`
X		case `echo "$LINE" | lines` in
X		0)	echo "No such user as $USER" ;;
X		1)
X			HDIR=`echo "$LINE" | cut -d: -f6`
X			FULL=`echo "$LINE" | cut -d: -f5 | sed 's/,.*//'`
X			ELMD=$HDIR/.elm
X			if [ ! -d $ELMD ]
X			then	echo "Creating $ELMD" ; mkdir $ELMD
X			fi
X			# create a file for transforming the others...
X			cat > $SEDF << SEDFILE
s#PATH#$HDIR#g
s#USER#$USER#g
s#FULLNAME#$FULL#g
SEDFILE
X			for FILE in elmrc Local Remote elmheaders
X			do
X				if [ -s $ELMD/$FILE ]
X				then
X				    if [ $OVERWRITE = yes ]
X				    then
X					echo "Overwriting $ELMD/$FILE"
X					rm $ELMD/$FILE
X				    elif [ $OVERWRITE = ask ]
X				    then
X					echo "Overwrite \c"
X					rm -i $ELMD/$FILE
X				    else
X					echo "Skipping $ELMD/$FILE"
X				    fi
X				else
X				    echo "Creating file $ELMD/$FILE"
X				fi
X				if [ ! -s $ELMD/$FILE ]
X				then
X				    sed -f $SEDF $SOURCE/$FILE > $ELMD/$FILE
X				fi
X			done
X			rm $SEDF
X			chown $USER.$GROUP $ELMD $ELMD/*
X			chmod 775 $ELMD
X			chmod 664 $ELMD/*
X			echo "Contents of $ELMD:"
X			ls -l $ELMD ;;
X		*)	echo "Multiple users called $USER"
X			echo "Repair the /etc/passwd file"
X			exit 2 ;;
X		esac
X	done
X	;;
esac
SHAR_EOF
chmod 0744 elmsetup ||
echo 'restore of elmsetup failed'
Wc_c="`wc -c < 'elmsetup'`"
test 1717 -eq "$Wc_c" ||
	echo 'elmsetup: original size 1717, current size' "$Wc_c"
fi
# ============= Local ==============
if test -f 'Local' -a X"$1" != X"-c"; then
	echo 'x - skipping Local (File already exists)'
else
echo 'x - extracting Local (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'Local' &&
FULLNAME
SHAR_EOF
chmod 0664 Local ||
echo 'restore of Local failed'
Wc_c="`wc -c < 'Local'`"
test 9 -eq "$Wc_c" ||
	echo 'Local: original size 9, current size' "$Wc_c"
fi
# ============= Remote ==============
if test -f 'Remote' -a X"$1" != X"-c"; then
	echo 'x - skipping Remote (File already exists)'
else
echo 'x - extracting Remote (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'Remote' &&
FULLNAME at the Bedford Institute of Oceanography
P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2
UUCP=..!{uunet|watmath}!dalcs!biome!USER BITNET=USER%biome%dalcs@dalac
InterNet=USER%biome@cs.dal.ca	OR	cs.dal.ca!biome!USER
SHAR_EOF
chmod 0664 Remote ||
echo 'restore of Remote failed'
Wc_c="`wc -c < 'Remote'`"
test 240 -eq "$Wc_c" ||
	echo 'Remote: original size 240, current size' "$Wc_c"
fi
# ============= elmheaders ==============
if test -f 'elmheaders' -a X"$1" != X"-c"; then
	echo 'x - skipping elmheaders (File already exists)'
else
echo 'x - extracting elmheaders (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'elmheaders' &&
Reply-to: cs.dal.ca!biome!USER (FULLNAME)
SHAR_EOF
chmod 0664 elmheaders ||
echo 'restore of elmheaders failed'
Wc_c="`wc -c < 'elmheaders'`"
test 42 -eq "$Wc_c" ||
	echo 'elmheaders: original size 42, current size' "$Wc_c"
fi
# ============= elmrc ==============
if test -f 'elmrc' -a X"$1" != X"-c"; then
	echo 'x - skipping elmrc (File already exists)'
else
echo 'x - extracting elmrc (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'elmrc' &&
#
# .elm/elmrc - options file for the ELM mail system
#
X
# For yes/no settings with ?, ON means yes, OFF means no
X
# where to save calendar entries
calendar = PATH/calendar
X
# what editor to use ("none" means simulate Berkeley Mail)
editor = /usr/bin/vi
X
# the character to use in the builtin editor for entering commands
escape = ~
X
# The full user name for outbound mail
fullname = FULLNAME
X
# where to save received messages to, default file is "=received"
receivedmail = PATH/Mail/Mbox
X
# where to save my mail to, default directory is "Mail"
maildir = PATH/Mail
X
# program to use for displaying messages ('builtin' is recommended)
pager = builtin+
X
# prefix sequence for indenting included message text in outgoing messages...
prefix = >
X
# how to print a message ('%s' is the filename)
print = pr -h ELM %s | lp -tELM
X
# where to save copies of outgoing mail to, default file is "=sent"
sentmail = PATH/Mail/Sent
X
# The shell to use for shell escapes
shell = /bin/csh
X
# local ".signature" file to append to appropriate messages...
localsignature = PATH/.elm/Local
X
# remote ".signature" file to append to appropriate messages...
remotesignature = PATH/.elm/Remote
X
# how to sort folders, "Mailbox" by default
sortby = Received
X
# should the default be to delete messages we've marked for deletion?
alwaysdelete = ON
X
# should the default be to store read messages to the "received" folder?
alwaysstore = OFF
X
# should the default be to keep unread messages in the incoming mailbox?
alwayskeep = ON
X
# should we use the "->" rather than the inverse video bar?
arrow = ON
X
# should the message disposition questions be displayed(ON) or
# auto-answered(OFF) with the default answers when we resync or change folders?
ask = ON
X
# would you like to be asked for Carbon-Copies information each msg?
askcc = ON
X
# automatically copy message being replied to into buffer? 
autocopy = ON
X
# threshold for bouncing copies of remote uucp messages...
# zero = disable function.
bounceback = 0
X
# save a copy of all outbound messages?
copy = ON
X
# do we want to be able to mail out AT&T Mail Forms?
forms = OFF
X
# should we keep folders from which all messages are deleted?
keepempty = OFF
X
# we're running on an HP terminal and want HOME, PREV, NEXT, etc...
keypad = OFF
X
# should we display the three-line 'mini' menu?
menu = ON
X
# when using the page commands (+ - <NEXT> <PREV>) change the current
# message pointer...?
movepage = ON
X
# just show the names when expanding aliases?
names = OFF
X
# when messages are copied into the outbound buffer, don't include headers?
noheader = ON
X
# start up by pointing to the first new message received, if possible?
pointnew = ON
X
# prompt for a command after the external pager exits?
promptafter = OFF
X
# emulate the mailx message increment mode (only increment after something
# has been 'done' to a message, either saved or deleted, as opposed to 
# simply each time something is touched)?
resolve = ON
X
# save messages, incoming and outbound, by login name of sender/recipient?
savename = ON
X
# save outbound messages by login name of sender/recipient even if the
# associated folder doesn't already exist?
forcename = ON
X
# are we running on an HP terminal and want HOME, PREV, NEXT, etc...?
# (this implies "keypad=ON" too)
softkeys = OFF
X
# Set the main prompt timeout for resynching...
timeout = 600
X
# display message title when displaying pages of message?
titles = ON
X
# are we good at it?  0=beginner, 1=intermediate, 2+ = expert!
userlevel = 0
X
# tell us about addresses to machines we can't directly get to?
warnings = ON
X
# enable the weedout list to be read?
weed = ON
X
# what headers I DON'T want to see, ever.
weedout = "Via:" "Sent:" "Status:" "Original" "From" "Phase" "Fruit" 
X	"Sun" "Date:" "Lat" "Buzzword" "Return" "Posted" "Telephone" 
X	"Postal-Address" "Origin" "X-Sent-By-Nmail-V" "Resent" "X-Location" 
X	"Source" "Mood" "Neuron" "Libido" "To:" "X-Mailer:" "Full-Name:" 
X	"X-HPMAIL" "Mmdf" "Network-" "Received:" 	"*end-of-user-headers*"
X
SHAR_EOF
chmod 0664 elmrc ||
echo 'restore of elmrc failed'
Wc_c="`wc -c < 'elmrc'`"
test 4005 -eq "$Wc_c" ||
	echo 'elmrc: original size 4005, current size' "$Wc_c"
fi
exit 0



-- 
William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography
P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2.  Tel. (902)426-1577
UUCP=..!{uunet|watmath}!dalcs!biome!silvert
BITNET=silvert%biome%dalcs@dalac	InterNet=silvert%biome@cs.dal.ca