procmail
[Top] [All Lists]

Re: autoresponder failure

2000-01-10 20:14:54
Colin J. Raven wrote:
Can someone take a look at this code, I've stared at it for four hours
(and amended it several times until its present form).
It's not working, but syntactically I believe it's OK. Ack...

 VERBOSE=ON
 MAILDIR=/var/mail
 PMDIR=$HOME/Procmail
 LOGFILE=$HOME/Procmail/log
 FILEDIR=$HOME/autores

#Deal with the mail loop issue first
 :0
 * !^FROM_DAEMON
 * !^x-Loop: my_user(_at_)dufus(_dot_)net
 {
#Inform sender that address has changed using info.txt
   :0 h c
   | (formail -rt -A "Precedence: junk" \
                  -A "X-Loop: my_user(_at_)dufus(_dot_)net" ; \
       cat $FILEDIR/info.txt) \
     | $SENDMAIL -t
#now forward the mail to the user's new address
   :0 c
   ! my_user(_at_)other_address(_dot_)com
 }   
#great, except it's not working at all (:

Any ideas anyone?

Lots. But how about telling just what part doesn't work, and what your
log says (if one was actually generated)?

While you are doing that, check the following:
 1. Is there any whitespace after the (supposedly) terminal \s on
    continued lines? If there is, the \s don't escape newline, and the
    continuations aren't seen as continuations.
 2. Is  formail  on procmail's path? Not your path in your shell, but
    in the path that procmail uses? Procmail puts that path into the
    procmailrc(5) man page when it is generated, right before the
    Environment  section.

-- 
Rik Kabel          Old enough to be an adult              
rik(_at_)netcom(_dot_)com

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