procmail
[Top] [All Lists]

Re: Auto Respond Looping

2000-11-02 13:55:38

Please send only one copy of your question.  If you forget to fill in
the subject, just let it go: anyone who can answer can certainly figure
out what your message is about and duplicates just waste space.


Todd Jamison <toddjamison(_at_)yahoo(_dot_)com> writes:
I have created a script that is supposed to send a
reply to any messages that I recieve.  The only thing
that isnt working properly with the script is when
there are two users that are autoresponding.  if one
user sends a mail to the other they will both do into
an infinite responding loop. This is on a Redhat Linux
6.2 Server. Here is a copy of the rc, script and the
email message.
...
:0 Hwc
* ! ^X-Loop: $LOGNAME
* ! ^FROM_DAEMON
| /usr/local/scripts/emailreply.sh

Well, here's your problem: you forgot to tell procmail to expand variables
in that first condition.  As a result, it's trying to match an X-Loop:
header that contains exactly one space, followed by a newline (thus
ending the header field), followed by a header field whose name starts
with "Logname".  The solution is to use the '$' special before the regexp:

        :0 Hwc
        * ! $ ^X-Loop: $LOGNAME
        * !   ^FROM_DAEMON
        | /usr/local/scripts/emailreply.sh


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>