#!/bin/sh
#
# autoreply-short
#
# This program is called to generate a reply to a message sent to systems.
#
# It should print a mail-style message to standard output, including
# headers and the body, and it should exit with a status of 0 in the
# message should be sent.
#
# A non-zero exit status will cause the reply to not be sent, but will
# not otherwise affect the req system.
#
# Req does not call this program with command line options.
#
# The PATH will be extremely minimal, if it exists at all.
#
# Environment variables that have been setup include:
#
# REQNUM      The number of the new request.
# REQORIGSUBJ The subject line without the req number in it.
# REQNEWSUBJ  The subject line with the req number in it.
# REQUSESUBJ  Just the part of the subject line with the req number in it.
# REQHEADER   A file name, where the file contains the user's mail header.
# REQBODY     A file name, where the file contains the user's mail body.
# REQAUTO     A file name, where the file contains a useful mail header
#               for the auto-reply program to use.  It does not contain
#               any CC: lines, and it did follow any reply-to: lines.
#               It does _not_ contain any blank lines.
# REQFROM     The information from the user's "from:" line.
# REQUSER     The best guess as to the email address in the from line.
#

PATH="/usr/ucb:/bin:/usr/bin"

cat $REQAUTO
echo ""

echo "Greetings.  (This is an automated response.  There is no need to reply.)"
echo ""
echo "Your message regarding:"
echo "  $REQORIGSUBJ"
echo "has been received and assigned a request number of $REQNUM."
echo ""
echo "In order help us track the progress of this request, we ask that you"
echo "include the string $REQUSESUBJ in the subject line of any further mail"
echo "about this particular request."
echo "For example:"
echo "    Subject: $REQNEWSUBJ"
echo ""
echo "You may do this simply by replying to this email."

exit 0
