aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/add_members3
-rwxr-xr-xbin/clone_member6
-rwxr-xr-xbin/newlist6
-rwxr-xr-xbin/sync_members2
4 files changed, 16 insertions, 1 deletions
diff --git a/bin/add_members b/bin/add_members
index fdc3f02b..03f0af3a 100755
--- a/bin/add_members
+++ b/bin/add_members
@@ -135,6 +135,9 @@ def addall(mlist, members, digest, ack, outfp):
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')
diff --git a/bin/clone_member b/bin/clone_member
index 1f2a03ac..915c540f 100755
--- a/bin/clone_member
+++ b/bin/clone_member
@@ -129,6 +129,12 @@ def dolist(mlist, options):
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:
diff --git a/bin/newlist b/bin/newlist
index 70e9cb8c..08b86e08 100755
--- a/bin/newlist
+++ b/bin/newlist
@@ -193,7 +193,11 @@ def main():
oldmask = os.umask(002)
try:
try:
- mlist.Create(listname, owner_mail, pw)
+ if lang == mm_cfg.DEFAULT_SERVER_LANGUAGE:
+ langs = [lang]
+ else:
+ langs = [lang, mm_cfg.DEFAULT_SERVER_LANGUAGE]
+ mlist.Create(listname, owner_mail, pw, langs=langs)
finally:
os.umask(oldmask)
except Errors.BadListNameError, s:
diff --git a/bin/sync_members b/bin/sync_members
index 4a21624c..13d0b2b0 100755
--- a/bin/sync_members
+++ b/bin/sync_members
@@ -260,6 +260,8 @@ def main():
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