procmail
[Top] [All Lists]

Re: NEWBEE: Autoresponder Problem

2001-03-09 00:10:59
Wild Apache Support <support(_at_)wildapache(_dot_)net> writes:
I am very new to procmail and am trying to setup an auto-responder.

Here is what my .procmailrc file looks like:

PATH=$PATH:/usr/local/bin

/usr/local/bin is already in the default PATH


:0 h c
# Perform a check to see if the mail was addressed to us
* $^To:.*\<mailtest(_at_)wildapache\(_dot_)net\>
# Do not reply to daemons and mailonglists
* !^FROM_DAEMON
# Mail loops are dangerous
* !^x-loop:.*\<mailtest(_at_)wildapache\(_dot_)net\>
{

The 'h' flag has no meaning on nested block recipes, so it can go.
(That's what the "Extraneous deliver-head flag ignored" log message
was trying to tell you.)  Meanwhile, the 'c' flag makes procmail fork,
resulting in two procmail processes, and you don't need that here,
so lose it too.


:0 h c
| (formail -rt -A "Precedence: junk" \
       -A"X-Loop: mailtest(_at_)wildapache(_dot_)net" ; \
       cat $MAILDIR/vacation.msg) \
 ) | $SENDMAIL -oi -t
}

Hmm, why create a nested block if you're just going to put a single
recipe inside it?  Also, since you put 'c' flags on both recipes, you'll
end up with two copies saved locally.  You only need the 'c' flag on the
recipe which invokes formail.  Also, vacation messages should be sent
with formail -r, not formail -rt. 

However, the real problem is that you have two close parens in the action.
So:

        :0 hc
         # Perform a check to see if the mail was addressed to us
        * $ ^To:.*\<mailtest(_at_)wildapache\(_dot_)net\>
         # Do not reply to daemons and mailonglists
        * ! ^FROM_DAEMON
         # Mail loops are dangerous
        * ! ^X-Loop:(.*\<)?mailtest(_at_)wildapache\(_dot_)net\>
        | (formail -r -A "Precedence: junk" \
                -A "X-Loop: mailtest(_at_)wildapache(_dot_)net" ; \
           cat $MAILDIR/vacation.msg) \
          | $SENDMAIL $SENDMAILFLAGS -t



The auto-responder is not working, could someone please help me with
this?

Must complement you on all of your problem report but this sentence;
you showed us the exact recipes you're using and the exact log entries
generated when VERBOSE=ON.  The only thing that kept this from being a
perfect problem report was that you failed to say _how_ it was working
and you failed to say what version of procmail you were using.  However,
since the recipes and logfile are generally the most important and useful
items, I must say, Bravo!


Philip Guenther
_______________________________________________
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>