#!      /bin/csh -f
#
# Copyright 1993, 1994, 1995 by the Regents of the University of California.
# see the file "Copyright" in the distribution for conditions of use.
#
#
#       set a forwarding address - no vacation
#
retry:
echo ' '
echo -n 'Enter address to which you want mail forwarded, "q" to quit: '
set e = $<
set m = ( $e  )
if ( $#m == 0 ) then
	echo ' '
	echo 'No address entered; no change will be made'
	exit 0
else if ( $#m > 1 ) then
	echo ' '
	echo 'Address can not contain blanks.'
	goto retry
else if ( $m == "q" ) then
	exit 0
endif
#
#	======================================
#
#	put new .forward in temp file
#
set new = `mktemp -c -pfrwrd`
echo $e >> $new
#
#	install it
install_forward $new
if ( $status ) then
	echo No changes made.
else
	echo Ok, mail will now be forwarded to \"$e\".
endif
/bin/rm -f $new
exit 0
