procmail
[Top] [All Lists]

Recipe Assistance please anyone

1999-05-30 15:16:45
Hi List!
I'm trying to accomplish several steps with one recipe. Doubtless it's
possible, but I have only procmailex to guide me thus far...
I need to do the following:
        1) Autoreply to an incoming message.
        2) Send a copy to the party who will be dealing with the content
of the message.
        3) Store a backup copy of the message locally (in case the
forward/bounce fails for any reason?)
        4. (Now things may get tricky I suppose) Write to a file that
will create a date/time stamp, and unique message number (starting maybe
at 1?) for each email that has been recieved and autoreplied to.
Sooooo...this is what I have come up with for handling the mail itself,
but #4 above still has me scratching my brain container.
--------<really big damn snip>
        :0 Whc: vacation.lock   * !^FROM_DAEMON
        * !^X-Loop: me(_at_)myemailaddress(_dot_)com
        | formail -rD 8192 vacation.cache

        :0 ehc          # if the name was not in the cache
#somehow, create a flatfile database that can insert a unique_ID and
#timestamp for each entry in the cache
        | (formail -rA"Precedence: junk" \
        -A"X-Loop: me(_at_)myemailaddress(_dot_)com ; \
#I guess I could "cat" the contents of a file into this bit, dunno how (:
        echo "Thanks for requesting a free sample of our eye patch"; \
        echo "A sample will be sent to the address you supplied within a
week."$
        echo "-- "; cat $HOME/.signature \
        ) | $SENDMAIL -oi -t
#Now to do the rest. Forward a copy to natalie for action, and keep
#a copy locally, for backup purposes.
#I don't know if procmail will see the what went before and the next steps
#as all one recipe.
:0      *       
* ^To: help(_at_)infusia(_dot_)com
{
:0 c
! mypal(_at_)elsewhere(_dot_)com

:0
infusia

}     
------<END of big damn snip>
TIA
-Colin  


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