procmail
[Top] [All Lists]

Re: dealing with anti-spam bounces?

1997-04-25 14:39:00
ariel(_at_)best(_dot_)com (Catherine Hampton) writes:

:0 c
spamtemp

:0
| (formail -rt \
    -A"X-Loop: ${NOLOOP}";\
    cat $SBDIR/junk;\
    cat spamtemp;\
    rm -f spamtemp) \
    | $SENDMAIL -oi -t


I don't like temporary files if they're avoidable.  
The above will break if two spams come in at the same time.
Here's how I do something similar, but without the temp file.

Mike


    NEW_HEADERS="`formail -r -I Cc: -A\"X-Loop: $MY_ADDR\"`"

    NEW_FRONT_OF_BODY="The following mail message was refused because it does
not contain a valid \"To:\" or \"Cc:\" field.
The message should be addressed directly to

   $MY_ADDR

-------------------- Refused Message Follows --------------------
"
    :0cw
    |(echo "$NEW_HEADERS"; echo "$NEW_FRONT_OF_BODY"; formail -I "Received:") 
|$SENDMAIL -oi -t