Thread View: best.bugs
1 messages
1 total messages
Started by Jimmy Aitken
Sun, 22 Nov 1998 00:00
Spambouncer/sendmail problem
Author: 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
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads