procmail
[Top] [All Lists]

Re: Simple responder

1998-04-02 09:18:49
I'd use a more elaborate recipe for this.

This recipe won't send more than one message to the same recipient, and it
won't send anything at all if the recipient is not in the To: or Cc:
header (keeps you from polluting mailing lists).

ME=j(_dot_)blow(_at_)cse(_dot_)psu(_dot_)edu
REPLY=ehrlich(_at_)cse(_dot_)psu(_dot_)edu

#
# use 'formail' to prevent duplicate responses
#
:0 Whc: .vacation.lock
*? test -r .vacation
*!^FROM_DAEMON
*$^TO${ME}
| formail -rD 8192 .vacation.cache

#
# The tests succeeded, but formail failed: send a reply
#
:0 ehc
| (formail -A"Subject: xxxx" \
        -A"Reply-To: ${REPLY}" ; \
        cat message \
) | $SENDMAIL -oi -t

#
# Trash message
#
:0
/dev/null

Hope this helps.
Ge' Weijers                                Voice: (614)326 4600
Progressive Systems, Inc.                    FAX: (614)326 4601
2000 West Henderson Rd. Suite 400
Columbus, OH 43220           http://www.Progressive-Systems.com

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