procmail
[Top] [All Lists]

Re: formail finer points

1997-05-21 10:42:00
On Wed, 21 May 1997 16:42:19 +0000 (GMT),
"Matthew G. Saroff" <msaroff(_at_)pca(_dot_)net> wrote:
| (formail -rk \
-A "X-Loop: msaroff(_at_)pca(_dot_)net" \
-A "Precendence: junk"; \
echo "Please don't send me any more mail";\
echo "This is an automated response";\
echo "I'll never see your message";\
echo "So, GO AWAY" ) | $SENDMAIL -t -oi
============================
     This is another of my email accounts, and I am using this to set 
up an autoresponder.  It picks up the bessage and works fine, but there 
are some changes that I'd like to make.  Currently the response is:
============================
blah blah blah
blah blah blah
blah blah blah
blah blah blah
Please don't send me any more mail
This is an automated response
I'll never see your message
So, GO AWAY
============================
     What I'd like to do is to do the following:
Please don't send me any more mail
This is an automated response
I'll never see your message
So, GO AWAY

---------- Forwarded message ----------
Full headers:
============================
     I've been looking through the docs on formail, and I'm not sure 
how to do this.

This has been brought up on the mailing list a few times. Perhaps it
should be in the FAQ. Here's one way to do it: 

    :0h
    HEADERS=| cat

    :0:
    * Your conditions here ...
    | (formail -r \
       -A "X-Loop: msaroff(_at_)pca(_dot_)net" \
       -A "Precedence: junk"; \
       echo "yap yap yap"; echo "$HEADERS"; ) | $SENDMAIL $SENDMAILFLAGS -t

Note that there is only one n in "Precedence:". This is untested, BTW.
Go back and look at the archives, I think there were a couple of
pretty good solutions. 

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

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