[net.sources] Automatic Mail Returner

ksl@hou2e.UUCP (a hacker) (06/15/85)

Here is a handy program I invoke to return mail when
I'm on vacation.  Here is how it works:
Type:
	$ start
and that's all there is to it.  It will automatically
reply to all mail senders with the text of the file
'mail.mesg'

Note: If \$HOME/.mailrc exists it will be moved to .omailrc

To stop it:
Type:
	$ at -l
	at: job ?.a 	[jot down ? which is many digits]
	$ at -r ?

Questions or comments:  hou2e!ksl

------ CUT HERE ------

Subject: Mail returner
Newsgroups: net.sources

Here is a handy program I invoke to return mail when
I'm on vacation.  Here is how it works:
Type:
	$ start
and that's all there is to it.  It will automatically
reply to all mail senders with the text of the file
'mail.mesg'  (customize to your need.)

Note: If \$HOME/.mailrc exists it will be moved to .omailrc

To stop it:
Type:
	$ at -l
	at: job ?.a 	[jot down ? which is many digits]
	$ at -r ?

Unpack this program in $HOME.

Note: is assumes that bin and mail are directories.

Questions or comments:  hou2e!ksl
Send updates to me.

------ CUT HERE ------
# This is a shell archive.  Remove anything before this line, then
# unpack it by saving it in a file and typing "sh file".  (Files
# unpacked will be owned by you and have default permissions.)
#
# This archive contains:
# bin/returnmail bin/start bin/mail.mesg .mailrc

echo x - bin/returnmail
cat > "bin/returnmail" << '//E*O*F bin/returnmail//'
while	test -s /usr/mail/\$LOGNAME
then	mailx <<!
R
~r mail.mesg
.
d
q
!
fi
at now + 1 day <<!
returnmail
!
//E*O*F bin/returnmail//

echo x - bin/start
cat > "bin/start" << '//E*O*F bin/start//'
at now + 1 day <<!
returnmail
!
//E*O*F bin/start//

echo x - bin/mail.mesg
cat > "bin/mail.mesg" << '//E*O*F bin/mail.mesg//'
Welcome to the return mailer.

Sorry, but hou2e!ksl is on vacation.

hou2e!ksl
//E*O*F bin/mail.mesg//

if 	test -s .mailrc
then	mv .mailrc .omailrc
echo x - .mailrc
cat > ".mailrc" << '//E*O*F .mailrc//'
se dot
s mbox
//E*O*F .mailrc//

exit 0