------------------------------------------------------------
revno: 1053
committer: Mark Sapiro <[EMAIL PROTECTED]>
branch nick: 2.1
timestamp: Fri 2008-02-29 09:47:36 -0800
message:
Changed add_members, clone_member and sync_members to catch or avoid
MembershipIsBanned exception and report appropriately.
modified:
NEWS
bin/add_members
bin/clone_member
bin/sync_members
=== modified file 'NEWS'
--- a/NEWS 2008-02-14 17:08:11 +0000
+++ b/NEWS 2008-02-29 17:47:36 +0000
@@ -155,6 +155,9 @@
moving the entry aside and logging the fact after the third dequeue of
the same entry.
+ - Fixed the command line scripts add_members, sync_members and
+ clone_member to properly handle banned addresses (1904737).
+
Miscellaneous
- Brad Knowles' mailman daily status report script updated to 0.0.17.
=== modified file 'bin/add_members'
--- a/bin/add_members 2005-08-27 01:40:17 +0000
+++ b/bin/add_members 2008-02-29 17:47:36 +0000
@@ -135,6 +135,9 @@
mlist.ApprovedAddMember(userdesc, ack, 0)
except Errors.MMAlreadyAMember:
print >> tee, _('Already a member: %(member)s')
+ except Errors.MembershipIsBanned, pattern:
+ print >> tee, ('%s:' %
+ member), _('Banned address (matched %(pattern)s)')
except Errors.MMBadEmailError:
if userdesc.address == '':
print >> tee, _('Bad/Invalid email address: blank line')
=== modified file 'bin/clone_member'
--- a/bin/clone_member 2005-08-27 01:40:17 +0000
+++ b/bin/clone_member 2008-02-29 17:47:36 +0000
@@ -129,6 +129,12 @@
if not options.quiet:
print _(' address not found:'), options.fromaddr
return
+ # Check for banned to address.
+ pattern = mlist.GetBannedPattern(options.toaddr)
+ if pattern:
+ if not options.quiet:
+ print ' ', _('Banned address (matched %(pattern)s)')
+ return
# Now change the membership address
try:
=== modified file 'bin/sync_members'
--- a/bin/sync_members 2005-08-27 01:40:17 +0000
+++ b/bin/sync_members 2008-02-29 17:47:36 +0000
@@ -260,6 +260,8 @@
print _('Added : %(s)s')
except Errors.MMAlreadyAMember:
pass
+ except Errors.MembershipIsBanned, pattern:
+ print ('%s:' % addr), _('Banned address (matched %(pattern)s)')
for laddr, addr in addrs.items():
# Should be a member, otherwise our test above is broken
--
Stable, maintained release series
https://code.launchpad.net/~mailman-coders/mailman/2.1
You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org