From a425c1ac771c4852b4bd1ebbb02436a98688cc2c Mon Sep 17 00:00:00 2001 From: klm Date: Thu, 23 Apr 1998 20:03:16 +0000 Subject: Ignore any mailcommands coming from postmaster-type accounts - mailer-daemon, postmaster, orphanage, and postoffice - on the presumption that they're failed subscribe instructions, bouncing back to the -request addr. I think this'll take care of that sticky problem fairly safely. Nobody should be sending commands from those accounts, anyway... --- modules/mm_mailcmd.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/mm_mailcmd.py b/modules/mm_mailcmd.py index 45383733f..8906773e6 100644 --- a/modules/mm_mailcmd.py +++ b/modules/mm_mailcmd.py @@ -1,6 +1,6 @@ """Process maillist user commands arriving via email.""" -__version__ = "$Revision: 398 $" +__version__ = "$Revision: 468 $" # Try to stay close to majordomo commands, but accept common mistakes. # Not implemented: get / index / which. @@ -58,6 +58,12 @@ class MailCommandHandler: def ParseMailCommands(self): mail = mm_message.IncomingMessage() subject = mail.getheader("subject") + sender = string.lower(mail.GetSender()) + if sender in ['mailer-daemon', 'postmaster', 'orphanage', + 'postoffice']: + self.LogMsg("bounce", "%s: Mailcmd from %s rejected, subj %s", + self._internal_name, sender, `subject`) + return if subject: subject = string.strip(subject) if (subject and self._cmd_dispatch.has_key(string.split(subject)[0])): -- cgit v1.3.1