--- mailman-2.0beta5/Mailman/Handlers/Hold.py.postonly Tue Aug 1 19:02:28 2000 +++ mailman-2.0beta5/Mailman/Handlers/Hold.py Sat Aug 5 18:31:50 2000 @@ -43,6 +43,8 @@ from Mailman import Message from Mailman import mm_cfg from Mailman import Utils +from Mailman import MailList +from Mailman import Errors from Mailman.Logging.Syslog import syslog @@ -104,6 +106,13 @@ +def CheckPostOnly (sender): + try: + m = MailList.MailList('post-only', lock=0) + return m.IsMember (sender) + except Errors.MMListError: + return 0 + def process(mlist, msg, msgdata): if msgdata.get('approved'): return @@ -141,7 +150,8 @@ if mlist.member_posting_only: posters = Utils.List2Dict(map(string.lower, mlist.posters)) if not mlist.IsMember(sender) and \ - not Utils.FindMatchingAddresses(sender, posters): + not Utils.FindMatchingAddresses(sender, posters) and \ + not CheckPostOnly(sender): # the sender is neither a member of the list, nor in the list of # explicitly approved posters hold_for_approval(mlist, msg, msgdata, NonMemberPost)