procmail
[Top] [All Lists]

Re: Help

1999-07-29 03:05:16
On Thu, 29 Jul 1999 11:00:57 +1200 (NZST), Volker Kuhlmann
<kuhlmav(_at_)elec(_dot_)canterbury(_dot_)ac(_dot_)nz> wrote:
If you're willing to just give the bad guy Sendmail bounces, you
can use this instead:
Is there any way to have the bounced message include (hopefully in
the first line of the message area) something like:
*** YOUR MAIL WAS THRASHED BY OUR ANTI-SPAM FILTERS ***
YES PLEEEEEASE ME TOO!!
I get email delivered without having control over the MDA, which is
sendmail. I can only run procmail via .forward, and I would **really**
like to return some ****holes' email simply with an error.

While this is not very useful (the novelty of it wears off after the
first couple of bounces and you are just generating more unnecessary
traffic rather than solving actual problems), it's easy enough to do.
To generate a stock bounce message, set the appropriate EXITCODE. To
bounce with your own bounce message is no different from sending any
other sort of autoreply, just make the reply look like a bounce. The
FAQ has some pointers to pertinent tools (notably, an autoresponse
generator which generates RFC1894-compliant bounce messages).
<http://www.iki.fi/era/procmail/mini-faq.html>

In all of these cases, you are free to also keep a copy of the
message you are responding to, just as with normal autoresponders.
Here's a classic:

    EXITCODE=67  # tell the recipient it didn't go through
    :0:
    $DEFAULT     # yet save it

Before you ask, the EXITCODE question is in the FAQ, too. Suitable
exit codes for Sendmail are usually to be found in the header file
/usr/include/sysexits.h (there are enough comments, have a look).
For qmail, look in the qmail documentation (I believe 100 or 101 will
be comparable to 67 under Sendmail, but this is from memory).

Hope this helps,

/* era */

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition

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