procmail
[Top] [All Lists]

Re: autobounce: I ALMOST got it

1997-06-12 15:49:00
:0
* ? fgrep -i -f $SBDIR/maybespam.list
* !^X-Loop: noloop(_at_)noloop(_dot_)nlp
{
  :0 c
========^==============add a : iff $SPAMFOLDER is really a folder file
  $SPAMFOLDER

  :0 c
  TEMP=|cat
====^^^^^^^^^==Get rid of this recipe. Just say no to tmp files.

  :0
  | (formail -bkrt -IReceived: -A"X-Loop: noloop(_at_)noloop(_dot_)nlp";\
    cat $SBDIR/maybespam.msg; echo "$TEMP") | $SENDMAIL -oi -t
====^============Here, I used to use:

 :0cwi
 |(echo $BOUNCEMSG; tee) | $SENDMAIL -oi -t
 :0:
 awaiting.resend

Where BOUNCEMSG is _something_ like:

 BOUNCEMSG="To: $TOO\\nSubject: Re: $SUB\\nPrecedence: Junk\\n\
 X-Loop: $MYADDR\\n\\n\
 I am returning this because it isn't for me, or of interest to me.\\n\
 If you really want me to see it, please resend it directly to me\\n\
 with MAGICWORD in the subject.\\n\\n----Refused message follows----\\n"
 
Note that this requires SysV echo, or any other echo which recognizes
\n.  You can also use cat instead of tee. TOO, SUB, and MYADDR are
appropriately defined earlier in the rc. You will also need a recipe to
handle resends, should there ever be one.

As I said, I used to do this, but it isn't worth the effort. Just do

 :0
 { EXITCODE=77 HOST }

, after storing it if you are cautious, and forget about it. As GB Shaw
said, "I learned long ago never to wrestle with a pig. You get dirty,
and besides, the pig likes it." Well, fortune says George said it.

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

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