procmail
[Top] [All Lists]

Saving, using, then deleting a message....

1997-04-16 05:53:00
I'd like to save a message to a temporary file with all headers intact,
reply to the message with a standard autoreply, append the text
file, send the reply, and then delete the temporary file.  Right now,
I am using an autoreply recipe like this:

# Autoreply to known spam
:0
* ^(From.|Reply-To:|Message-ID:|Received:).*[^0-9A-Za-z](spamsite\.net|\
        anotherspamsite\.(com|net))
* !^X-Loop: noloop(_at_)noloop(_dot_)nlp
{
:0 c
$SPAMFOLDER

:0
| (formail -bkrt \
    -I"Cc: 
postmaster(_at_)spamsite(_dot_)net,abuse(_at_)upstreamprovider(_dot_)net" \
    -A"X-Loop: noloop(_at_)noloop(_dot_)nlp";\
    cat $HOME/shared/stopjunk) | $SENDMAIL -oi -t
}

This works well, but does not preserve the headers of the original
message, which means that the autoreply is not as useful as it might
be to the upstream provider.  

I also would prefer to have my reply appear above the message --
it's less annoying that way.  And while I don't mind annoying spammers
in the least, I'd rather treat the poor upstream providers with some
consideration. :)

I know there has to be an easy answer to this, but for some reason what
I've tried so far has resulted in either not saving the spam message
at all, or in appending it to an ever-growing file because the program
doesn't properly delete it after the autoreply is sent.

Suggestions?  


Catherine

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