diff options
author | Mark Sapiro <msapiro@value.net> | 2007-11-18 12:01:26 -0800 |
---|---|---|
committer | Mark Sapiro <msapiro@value.net> | 2007-11-18 12:01:26 -0800 |
commit | fa0b0e8852a31d6aa59651c7c92460c607a7337e (patch) | |
tree | 1324b000c9ced25f59eb07026c7b34934efac724 /Mailman/Handlers/Moderate.py | |
parent | f383c36db54e30c67f9bf22fc1498e9fed7b65d1 (diff) | |
download | mailman2-fa0b0e8852a31d6aa59651c7c92460c607a7337e.tar.gz mailman2-fa0b0e8852a31d6aa59651c7c92460c607a7337e.tar.xz mailman2-fa0b0e8852a31d6aa59651c7c92460c607a7337e.zip |
Gui/GuiBase.py - Deleted the _escape() method - not needed since 2.1.9
Gui/GuiBase.py
Gui/Privacy.py
Handlers/Moderate.py - Patched with a slightly modified version of sf patch
1220144 - allow specifying another list in
accept_these_nonmembers.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Handlers/Moderate.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Mailman/Handlers/Moderate.py b/Mailman/Handlers/Moderate.py index 97d998b2..84ff14e5 100644 --- a/Mailman/Handlers/Moderate.py +++ b/Mailman/Handlers/Moderate.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2003 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2007 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -12,7 +12,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. """Posting moderation filter. """ @@ -28,6 +29,7 @@ from Mailman import Errors from Mailman.i18n import _ from Mailman.Handlers import Hold from Mailman.Logging.Syslog import syslog +from Mailman.MailList import MailList @@ -129,6 +131,15 @@ def matches_p(sender, nonmembers): continue if cre.search(sender): return 1 + elif are.startswith('@'): + # XXX Needs to be reviewed for list@domain names. + try: + mother = MailList(are[1:], lock=0) + if mother.isMember(sender): + return 1 + except Errors.MMUnknownListError: + syslog('error', 'filter references non-existent list %s', + are[1:]) return 0 |