summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormailman1998-05-26 03:07:12 +0000
committermailman1998-05-26 03:07:12 +0000
commita0da2180a78a7954705ddd5eaf92fa09bf829c81 (patch)
treea3998991c5c6b1f0df6e9c1f80a03c8b654eb8bd
parent2f8aee333c15ef55e81d1702c9c477f688221d10 (diff)
downloadmailman-a0da2180a78a7954705ddd5eaf92fa09bf829c81.tar.gz
mailman-a0da2180a78a7954705ddd5eaf92fa09bf829c81.tar.zst
mailman-a0da2180a78a7954705ddd5eaf92fa09bf829c81.zip
Complain and bail if the list was specified with an '@' - don't let
the operator make the mistake of specifying the list's address...
-rwxr-xr-xbin/newlist8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/newlist b/bin/newlist
index a995463e7..c2781f372 100755
--- a/bin/newlist
+++ b/bin/newlist
@@ -10,7 +10,7 @@ immediately. Otherwise, the script hangs pending input, to give time for
the person creating the list to customize it before sending the admin an
email notice about the existence of the new list."""
-__version__ = "$Revision: 515 $"
+__version__ = "$Revision: 548 $"
ADDALIASES_CMD = '/home/mailman/mailman/bin/addaliases'
@@ -26,6 +26,12 @@ def main(argv):
else:
list_name = string.lower(raw_input("Enter the name of the list: "))
+ if '@' in list_name:
+ sys.stderr.write("** List name must not include '@': %s\n"
+ % `list_name`)
+ sys.stderr.write(" (It's the list name, not address.)\n")
+ return 1
+
if list_name in mm_utils.list_names():
sys.stderr.write("** List with name %s already exists\n" % `list_name`)
return 1