procmail
[Top] [All Lists]

Re: auto replyy

1997-01-14 06:30:08
Paul Keller seems to have said:
I'm very new to procmail and I'm trying to help someone generate an
automatic response to an email addressed to, say: XXXX(_at_)domain(_dot_)com

any mail going to this alias needs to do 3 things:
 1. execute a script which increments a counter so the message the
    get has a line like:
    your case number is: xxx 
    which is one higher than the previous one.
    I was able to get this to work with the following:

:0ci
| /users/XXXX/countmail.ksh  
        # output of which is file called: auto_response

        I suspect that this is an unnessary script.
        We can do it in the response recipe directly.

    2. I need to have the auto_response file delivered to the sender

(I haven't gotten this to work, I don't think formail is getting the
 sender's name passed from the previous recipe )

   Here's what I tried:

:0hb
* !^FROM_DAEMON
* ^To:.XXXX*

        Are you sure you want this regexp here?
        Would:
                * ^TO_XXXX
        ... make more sense?

* ^Subject:.info*
  | (formail -r -A"Precedence: bulk" \
     /bin/cat /users/XXXX/auto_response) | $SENDMAIL -t

        I would change the /bin/cat to invoke a simple
        external script that would do countmail.ksh
        directly.  countmail.ksh can then simply send its
        output to standard out (eliminating the need for a 
        temp file) or you can create your output/transaction
        file (since you're not using a copying recipe the
        customer's original message will be lost unless your
        script reads it from the pipe and does something
        with it).

  3. I need the orginal message sent to dev null

        If you use a variation of the recipe above --
        the message will be considered "delivered" by
        procmail.  There's no need to check for it
        in later scripts -- any message that would have
        matched would have been responded to.

  Still undergoing testing, I've sent mail to this id.
  At times I see the formail appear in the logfile, but the
  reply never shows up in my inbox nor does syslog show 
  an outbound message is being generated.

I know given time, I could probably work this out, but the end-user
needs a solution relatively soon.

Thanks Much,
Paul Keller

-- 
Jim Dennis,                                
info(_at_)mail(_dot_)starshine(_dot_)org
Proprietor,                          
consulting(_at_)mail(_dot_)starshine(_dot_)org
Starshine Technical Services              http://www.starshine.org

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