Article View: best.bugs
Article #21Spambouncer/sendmail problem
From: Jimmy Aitken
Date: Sun, 22 Nov 1998 00:00
Date: Sun, 22 Nov 1998 00:00
72 lines
2658 bytes
2658 bytes
I've set up procmail to check for some keyworkds in subject lines
ad/or well known spam havens and send psuedo bounce messages to the
senders if they meet certain criterea. I'm pretty sure that this
worked for some time, until recently when I've noticed that the
"bounce@ messages don't get sent out and are deposited in
"dead.letter" in my home directory. The main part of my procmail
recipe that does this is below.
Has anyone else had this problem, or if not, can anyone see what could
possibly causing the messages not to be sent?
Jimmy
---
SPAMBOX=$HOME/spam
BOUNCE=$HOME/bounced
SPAMADMIN=jimmy@peter.com
SPAMHOST=peter.com
SPAMHOST=$HOST
FORMAIL=formail
SENDMAILFLAGS="oi -t"
[[ deleted ]
:0
* BOUNCETHIS ?? yes
{
:0 c:
spamtemp
:0
{ SPAMFROM=`${FORMAIL} -rt -xTo: | sed 's/^[ ]*//'` }
:0
{ SPAMERROR=`${FORMAIL} -xErrors-To: | sed 's/^[ ]*//'` }
:0
{ WHOTO=`${FORMAIL} -xX-Rcpt-To: -xTo: | sed -e 's/^[ ]*//' -e1q` }
:0
{ SPAMDATE=`date` }
:0 c: spamtemp.lock
| (${FORMAIL} -rt \
-I"From: MAILER-DAEMON@$SPAMHOST (Mail Delivery Subsystem)" \
-I"Subject: Returned mail: User unknown" \
-I"Auto-Submitted: auto-generated (failure)" \
-A"X-Mailer: SpamStopper";\
echo "The original message was received at $SPAMDATE";\
echo "from $SPAMFROM";\
echo " ";\
echo "----- The following addresses had permanent fatal errors -----";\
echo "$WHOTO";\
echo " ";\
echo "----- Transcript of session follows -----";\
echo "... while talking to $SPAMHOST.:";\
echo ">>> RCPT To:<$WHOTO>";\
echo "<<< 550 Bad recipient";\
echo "550 $WHOTO... User unknown";\
echo "550 Possible junk mail detected - mail returned";\
echo "Reporting-MTA: dns; $SPAMHOST";\
echo " ";\
echo "Arrival-Date: $SPAMDATE";\
echo "Final-Recipient: RFC822; $WHOTO";\
echo "Action: failed";\
echo "Status: 5.1.1";\
echo "Diagnostic-Code: SMTP; 550 Bad recipient";\
echo "Last-Attempt-Date: $SPAMDATE";\
cat spamtemp;\
${RM} -f spamtemp) \
| ${SENDMAIL} ${SENDMAILFLAGS}
:0
$BOUNCE
}
Technical Details
Message-ID:
<73armr$g9q$1@shell3.ba.best.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f669e,be74fefb9b275dfb,start X-Google-Attributes: gidf669e,public From: petejim@best.com (Jimmy Aitken) Subject: Spambouncer/sendmail problem Date: 1998/11/22 Message-ID: <73armr$g9q$1@shell3.ba.best.com> X-Deja-AN: 414694665 Distribution: best X-Trace: nntp1.ba.best.com 911798817 12758 petejim@206.184.139.134 Organization: a user of Best Internet Communications, Inc. www.best.com Newsgroups: best.bugs