I have been using the EXITCODE = 67 and HOST to bounce unwanted messages
from Cyberpromo. I've tested this with another account and it works
fine. I have noticed two things that I'm wondering about:
1. In the bounce message, my .forward file is quoted. Can this be
prevented?
You mean like this (the stuff between "####" lines)? AFAIK, no.
=== BEGIN SAMPLE EXITCODE BOUNCE ===
-> From MAILER-DAEMON(_at_)exo(_dot_)com Wed Apr 23 13:27:58 1997
-> Received: from mail6.netcom.com (root(_at_)mail6(_dot_)netcom(_dot_)com
[192.100.81.142]) by ns2.snni.com (8.8.0/8.6.9) with SMTP id NAA32154 for
<bodysurf(_at_)exo(_dot_)com>; Wed, 23 Apr 1997 13:27:57 -0700
-> Received: from localhost (localhost) by mail6.netcom.com (8.6.13/Netcom)
-> id NAA05731; Wed, 23 Apr 1997 13:26:29 -0700
-> Date: Wed, 23 Apr 1997 13:26:29 -0700
-> From: Mailer-Daemon(_at_)netcom(_dot_)com (Mail Delivery Subsystem)
-> Subject: Returned mail: Insufficient permission: Error 0
-> Message-Id: <199704232026(_dot_)NAA05731(_at_)mail6(_dot_)netcom(_dot_)com>
-> To: <bodysurf(_at_)exo(_dot_)com>
-> Status: O
->
-> The original message was received at Wed, 23 Apr 1997 13:26:27 -0700
-> from bodysurf(_at_)server(_dot_)snni(_dot_)com [165.113.174.1]
####
-> ----- The following addresses had delivery problems -----
-> "|IFS=' ';p=/u5/bodysurf/Bin/procmail;if test -x $p; then exec $p -Yf- ;
else exec /usr/local/nuglops/bin/procmail -Yf-; fi #bodysurf" (unrecoverable
error)
-> (expanded from: <bodysurf(_at_)netcom(_dot_)com>)
->
-> ----- Transcript of session follows -----
-> 550 "|IFS=' ';p=/u5/bodysurf/Bin/procmail;if test -x $p; then exec $p -Yf- ;
else exec /usr/local/nuglops/bin/procmail -Yf-; fi #bodysurf"... Insufficient
permission: Error 0
####
-> ----- Original message follows -----
-> Return-Path: <bodysurf(_at_)exo(_dot_)com>
-> Received: from server.snni.com (bodysurf(_at_)server(_dot_)snni(_dot_)com
[165.113.174.1]) by mail6.netcom.com (8.6.13/Netcom)
-> id NAA05714; Wed, 23 Apr 1997 13:26:27 -0700
-> Received: (from bodysurf(_at_)localhost) by server.snni.com (8.6.12/8.6.9)
id NAA10499 for bodysurf(_at_)netcom(_dot_)com; Wed, 23 Apr 1997 13:27:47 -0700
-> From: Tim <bodysurf(_at_)exo(_dot_)com>
-> Message-Id: <199704232027(_dot_)NAA10499(_at_)server(_dot_)snni(_dot_)com>
-> Subject: TEST
-> To: bodysurf(_at_)netcom(_dot_)com
-> Date: Wed, 23 Apr 1997 13:27:47 -0700 (PDT)
-> Reply-To: bodysurf(_at_)exo(_dot_)com
-> X-Mailer: ELM [version 2.4 PL24]
-> MIME-Version: 1.0
-> Content-Type: text/plain; charset=US-ASCII
-> Content-Transfer-Encoding: 7bit
-> Content-Length: 0
=== END SAMPLE EXITCODE BOUNCE ===
2. Mailstat doesn't report these bounces since they don't end up in any
folder (naturally). Is there an easy way to have procmail log something
similar to "Cyberpromo bounce" so that when I run mailstat it shows how
many total bounces were sent back? I have received about 10 of that
stupid message from grow(_at_)savetrees(_dot_)com and would like to count how
many
times they send this mess before giving up. (I've been manually reading
the log file in addition to using mailstat.
A couple things you can do.
1) Save the headers of the bounced email to a file for later examination
like this:
:0
* ^From.*spammer
{
EXITCODE = 77
:0h:
| gzip -fc >> $HOME/spams.gz
}
2) I haven't tested this out, but you could perhaps egrep thru your
logfile like this:
egrep '^From(_dot_)*grow(_at_)savetrees\(_dot_)com' log
and perhaps piping the output thru `wc` to get a count of how many times
they sent it.
Lates!
---------------------------------------------------------------------------
Tim <bodysurf(_at_)pobox(_dot_)com>
mailto:bodysurf(_at_)pobox(_dot_)com
Finger bodysurf(_at_)pobox(_dot_)com for my PGP public key (Bits 1024/KeyID
09DA5C49).
PGP Key FPrint (09/03/94): 4C 97 F1 FA 70 55 68 91 49 D1 AD F2 DD 63 0C 15
---------------------> Please PGP encrypt your email <---------------------