procmail
[Top] [All Lists]

Re: Autoresponse based on email address

2003-01-03 14:15:39
On Fri, Jan 03, 2003 at 01:39:41PM -0700, Ashley M. Kirchner wrote:

    How can I setup a recipe to send an auto response based on the 
recipient address?  Here's the scenario:  I receive mail as my regular 
address (this email) as well as 'webmaster(_at_)pcraft(_dot_)com' (which is 
aliased 
to me).  If someone emails me at my regular address, I just want it 
delivered, but if someone emails me at the web master address, I want to 
fire back an auto responder message as well as deliver the message to 
me.  How can I accomplish this?

There's an adequate recipe in the procmailex manpage that does almost
precisely this (which you have read, but perhaps just missed?). You'll
want to add another condition:

    :0 h c
    * ^TO_webmaster(_at_)pcraft(_dot_)com
    * !^FROM_DAEMON
    * !^X-Loop: webmaster(_at_)pcraft(_dot_)com
    | (formail -r -I"Precedence: junk" \
        -A"X-Loop: webmaster(_at_)pcraft(_dot_)com" ; \
       echo "Mail received.") | $SENDMAIL -t

Scott
-- 
Scott Wiersdorf
scott(_at_)perlcode(_dot_)org

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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