On Sat, 7 Feb 1998, Scott Gimenez wrote:
I have an account named Support.
And I have a textfile I would like to automatically send whenever someone
sends mail to Support, named support.msg.
This is somthing that I use to respond to postmaster mail:
RESPONCE=$HOME/mail/responce
# this is to catch all the postmaster mail
:0
* (^TO|Cc:.*)(postmaster(_at_)(_dot_)*ufl\(_dot_)edu)
{
:0 h c
* !^FROM_DAEMON
* !^X-Loop: post(_at_)nersp(_dot_)nerdc(_dot_)ufl(_dot_)edu
| (formail -r -A"Precedence: junk" \
-A"X-Loop: post(_at_)nersp(_dot_)nerdc(_dot_)ufl(_dot_)edu" \
-I"ReplyTo: postmaster(_at_)ufl(_dot_)edu" ; \
cat $RESPONCE/postmaster) | $SENDMAIL -t
:0:
postmaster.`date +%Y-%m`
}
Anything that is sent to my postmaster address get checked that it was not
sent by a daemon. You should replace
post(_at_)nersp(_dot_)nerdc(_dot_)ufl(_dot_)edu in both
places with the address of the list. This cuts down on mail loops.
The message is piped to formail which generates an autoresponce. Replace
$RESPONCE/postmaster with the full path name of responce file you wish to
send, and change the folder you wish procmail to deliver localy to.
This is something that I (mostly) stole from the man page for procmailex.
I sudgest that you read that man page carefully.
Good Luck,
Eric