procmail
[Top] [All Lists]

Re: Auto Replys

1997-07-10 12:29:00


On Thu, 10 Jul 1997, Ian Chilton wrote:

Hello,

This is a cutting from my procmail rc file:

------------------------------------------------------------------------------------------------

* ^X-ApparentlyTo: ian
*!^FROM_DAEMON
*!^X-Loop:ian(_at_)chiltons(_dot_)u-net(_dot_)com
|(formail -r -a "Precedence: junk"\
-I"From: Auto Reply from Ian Chilton 
<ian(_at_)chiltons(_dot_)u-net(_dot_)com> " \
-I"Subject: Delivery Successful" \
-A "X-Loop: ian(_at_)chiltons(_dot_)u-net(_dot_)com";\
cat /root/.procmail/reply.txt ) |$SENDMAIL -t

/var/spool/mail/ianmail

This worked fine until I tried to add the auto reply bit to ian. Please
could someone tell me what I have done wrong. I want to drop mail for
ian into /var/spool/mail/ianmail and send an autoreply. 

Well you don't show what starts the auto reply sequence,but I guess it is
something like this:

:0
* ^X-ApparentlyTo: ian
*!^FROM_DAEMON
*!^X-Loop:ian(_at_)chiltons(_dot_)u-net(_dot_)com
..etc deleted...

and then what comes after that?  just 

/var/spool/mail/ianmail

I think I would do

:0
* ^X-ApparentlyTo: ian
*!^FROM_DAEMON
*!^X-Loop:ian(_at_)chiltons(_dot_)u-net(_dot_)com
{

        # Do you need a 'c' in the ':0:' on the next line??
        :0:
        /var/spool/mail/ianmail

        :0a
        |(formail -r -a "Precedence: junk"\
        -I"From: Auto Reply from Ian Chilton 
<ian(_at_)chiltons(_dot_)u-net(_dot_)com> " \
        -I"Subject: Delivery Successful" \
        -A "X-Loop: ian(_at_)chiltons(_dot_)u-net(_dot_)com";\
        cat /root/.procmail/reply.txt ) |$SENDMAIL -t

}

That's untested BTW.

But you want the 'a' flag for 'do this if the preceding recipe succeeded,
right?  Right now the way you have it is wrong because all it tells them
is that it arrived at your .procmailrc file, not that it arrived in your
mailspool -- so you could be autoresponding telling them that it arrived
when in fact it failed!

Others might have further suggestions

TjL

ps -- when I auto-reply I never use a valid 'From:' line.... to prevent
loops... I use something like 'From: Timothy Luoma <luomat_at_peak.org>'


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