procmail
[Top] [All Lists]

Auto-Reply question

1997-10-24 06:52:11
Hi Everyone,

I wrote a small auto-reply script that looks like that:

+++ Begin Script

SHELL=/bin/sh    # for other shells, this might need adjustment
#Set on when debugging
VERBOSE=off
#Sendmail command
SENDMAIL=/usr/lib/sendmail
# Log for main procmailrc
#LOGFILE=/var/log/procmail
 
:0
# Perform check to make sure it's not from a list
* !^FROM_DAEMON
* !^X-Loop:(_dot_)*oldemploy(_at_)Nynexst(_dot_)COM
# Send the Auto-Reply message and forward to helpdesk staff
| (formail -rI"Precedence: junk"
            -I"From: PostMaster(_at_)Nynexst(_dot_)COM"
            -I"X-Loop: oldemploy(_at_)Nynexst(_dot_)COM" ;
      echo "Sorry,";
      echo "";
      echo "Text of REPLY.";
      echo "";
      echo "- PostMaster, Nynex S&T";
      echo "";      ) | $SENDMAIL -oi -t

+++ End of script

And there are "\" at the end of each lines. BTW, I created only one alias for
all the employees that left the company. When someone leaves, I'll forward
his/her mail to this alias. I wrote script that's calls procmail with this rc
file and I pipe the mail in it.

What I need to know is how do I include the $SUBJECT and the $TO of the
original message. I would like to write something like:

 Your message to $TO concerning $SUBJECT could not be delivered...

How can I do that.


-- 
Charles Gagnon                   | All opinions expressed herein are
Systems Admin, Pencom PSA        | fictitious. Any ressemblance with
Charlesg(_at_)Psa(_dot_)Pencom(_dot_)COM          | actual opinions, living or 
dead is
at: Bell Atlantic S&T            | purely concidental.

   To err is Human, to forgive is against Departmental Policy!

<Prev in Thread] Current Thread [Next in Thread>