Re: mailer daemon responses not being trashed...
Sam Vilain <[email protected]>
| Newsgroups | gmane.mail.spam.active-spam-killer.general |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 08 Feb 2004 23:27, Sam Vilain wrote; > As a lucky recipient of over 20 spams and 100 spam bounces per day, I > discovered ASK will utmost glee. > However, a small percentage of the bounces are still making it > through. Looks like I misread a feature's description. I've implemented the feature I actually wanted, and have attached the patch. Highly recommended for anyone who is the victim of a spammer using their domain for a return address. -- Sam Vilain, sam /\T vilain |><>T net, PGP key ID: 0x05B52F13 (include my PGP key ID in personal replies to avoid spam filtering) America is the only country that went from barbarism to decadence without civilization in between. OSCAR WILDE
ask.patch
(text/x-diff, 1.5 KB)
--- ask-2.5.0.orig/askmain.py 2003-06-13 12:30:39.000000000 +1200
+++ ask-2.5.0/askmain.py 2004-02-09 09:14:14.000000000 +1300
@@ -146,9 +146,18 @@
self.log.write(1, "Header X-AskVersion found. Probable invalid reply from a confirmation message. Ignoring.")
return(self.config.RET_PROCMAIL_STOP)
else:
- self.log.write(1, "Header X-AskVersion not found. Copying directly to mailbox.")
- self.msg.deliver_mail("Message from Mailer-Daemon")
- return(self.config.RET_PROCMAIL_CONTINUE)
+ found = 0
+ for (recipient_name, recipient_mail) in self.msg.get_recipients():
+ if (self.msg.is_from_ourselves(recipient_mail)):
+ found = 1
+
+ if (found):
+ self.log.write(1, "Bounce to us. Delivering")
+ self.msg.deliver_mail("Message from Mailer-Daemon")
+ return(self.config.RET_PROCMAIL_CONTINUE)
+ else:
+ self.log.write(1, "Bounce to unknown address. Ignoring.")
+ return(self.config.RET_PROCMAIL_STOP)
else:
self.log.write(1, "Sender is not mailer-daemon")