
Here is the traceback for the failure. Now that I think about it, it's probably that the bin/newlist executable is looking at the 0 parameter instead of the 1 parameter.
For example, on the command line
bin/newlist test
bin/newlist is parameter 0
test is parameter 1
Notice that the expected directory should have been:
'/home/mailman/archives/private/test.mbox'
but was instead:
'/home/mailman/archives/private/bin/newlist.mbox'
I've been looking in the code to see where this might be going wrong, but haven't gotten anywhere.
-----------traceback-------------
[root@taz2 mailman]# bin/newlist test Enter the email of the person running the list: midnight@the- oasis.net Initial bin/newlist password: Traceback (innermost last): File "bin/newlist", line 213, in ? main(sys.argv) File "bin/newlist", line 163, in main mlist.Create(listname, owner_mail, pw) File "/home/mailman/Mailman/MailList.py", line 775, in Create self.InitVars(name, admin, crypted_password) File "/home/mailman/Mailman/MailList.py", line 335, in InitVars Archiver.InitVars(self) # has configurable stuff File "/home/mailman/Mailman/Archiver/Archiver.py", line 108, in InitVars Utils.mkdir(self.private_archive_file_dir) File "/home/mailman/Mailman/Utils.py", line 568, in mkdir os.mkdir(dir, mode) OSError: [Errno 2] No such file or directory: '/home/mailman/archives/private/bin/newlist.mbox'

Phil Barnett wrote:
Here is the traceback for the failure. Now that I think about it, it's probably that the bin/newlist executable is looking at the 0 parameter instead of the 1 parameter.
At the beginning of main there is this line of code that parses the arguments.
opts, args = getopt.getopt(sys.argv[1:], 'ho:', ['help', 'output='])
getopt takes the passed in arguments (sys.argv[1:]) and removes the ones it takes care of leaving the rest in the "args" variable. Unfortunately, later on when reading the command line arguments they are read from the original argv instead of the modified args. Attached is a patch that fixes this problem.
Tanner Lovelace
Tanner Lovelace lovelace@wayfarer.org http://wtl.wayfarer.org/ Cthulu for President. Why settle for the lesser evil?
--- newlist.orig Tue Nov 14 23:48:13 2000 +++ newlist Tue Nov 14 23:55:47 2000 @@ -125,7 +125,7 @@ usage(0)
if len(args) > 0:
- listname = argv[0]
- listname = args[0] else: listname = raw_input("Enter the name of the list: ") listname = string.lower(listname)
@@ -137,13 +137,13 @@ usage(1, 'List already exists: ' + listname)
if len(args) > 1:
- owner_mail = argv[1]
owner_mail = args[1] else: owner_mail = raw_input( "Enter the email of the person running the list: ")
if len(args) > 2:
- list_pw = argv[2]
- list_pw = args[2] else: list_pw = getpass.getpass("Initial %s password: " % listname) # List passwords cannot be empty

On 15 Nov 2000, at 0:00, Tanner Lovelace wrote:
Phil Barnett wrote:
Here is the traceback for the failure. Now that I think about it, it's probably that the bin/newlist executable is looking at the 0 parameter instead of the 1 parameter.
At the beginning of main there is this line of code that parses the arguments.
opts, args = getopt.getopt(sys.argv[1:], 'ho:', ['help', 'output='])
getopt takes the passed in arguments (sys.argv[1:]) and removes the ones it takes care of leaving the rest in the "args" variable. Unfortunately, later on when reading the command line arguments they are read from the original argv instead of the modified args. Attached is a patch that fixes this problem.
Great, that fixed newlist.
Thanks.
At the same time newlist stopped working, my archives and web interfaces all stopped working. I wonder what else is hiding...
How do we start troubleshooting this?
http://www.matrixlist.com/mailman/listinfo

Phil Barnett wrote:
Great, that fixed newlist.
On further investigation, there was already a patch on sourceforge for this bug. The patch on sourceforge also modifies one more line that mine didn't that should be changed. The patch can be found at:
https://sourceforge.net/patch/download.php?id=102370
Other references: https://sourceforge.net/patch/?func=detailpatch&patch_id=102370&grou... https://sourceforge.net/bugs/?func=detailbug&bug_id=122333&group_id=...
Tanner Lovelace
Tanner Lovelace lovelace@wayfarer.org http://wtl.wayfarer.org/ Cthulu for President. Why settle for the lesser evil?

Below is the bin/newlist patch I just checked in.
"PB" == Phil Barnett midnight@the-oasis.net writes:
PB> At the same time newlist stopped working, my archives and web
PB> interfaces all stopped working. I wonder what else is
PB> hiding...
Take a look at the current CVS snapshot. I think those bugs (well, at least the archives one) should be fixed.
-Barry
-------------------- snip snip -------------------- Index: newlist =================================================================== RCS file: /cvsroot/mailman/mailman/bin/newlist,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- newlist 2000/11/10 18:42:46 1.35 +++ newlist 2000/11/15 12:49:18 1.36 @@ -18,10 +18,16 @@
"""Create a new, unpopulated mailing list.
-Usage: %(PROGRAM)s <listname> <listadmin's-addr> <admin-password> <immediate> +Usage: %(PROGRAM)s [options] listname listadmin-addr admin-password
Options:
- -q
- --quiet
Normally the administrator is notified by email (after a prompt) that
their list has been created. This option suppresses that
notification.
- -o file --output=file Append the alias setting recommendations to file, in addition to
@@ -110,22 +116,25 @@
-def main(argv): +def main(): try:
opts, args = getopt.getopt(sys.argv[1:], 'ho:',
['help', 'output='])
opts, args = getopt.getopt(sys.argv[1:], 'ho:q',
['help', 'output=', 'quiet'])
except getopt.error, msg: usage(1, msg)
appendfile = None
quiet = 0 for opt, arg in opts: if opt in ('-o', '--output'): appendfile = arg if opt in ('-h', '--help'): usage(0)
if opt in ('-q', '--quiet'):
quiet = 1
if len(args) > 0:
- listname = argv[0]
- listname = args[0] else: listname = raw_input("Enter the name of the list: ") listname = string.lower(listname)
@@ -137,13 +146,13 @@ usage(1, 'List already exists: ' + listname)
if len(args) > 1:
- owner_mail = argv[1]
owner_mail = args[1] else: owner_mail = raw_input( "Enter the email of the person running the list: ")
if len(args) > 2:
- list_pw = argv[2]
- list_pw = args[2] else: list_pw = getpass.getpass("Initial %s password: " % listname) # List passwords cannot be empty
@@ -186,28 +195,29 @@ fp.write('\n') fp.close()
if len(argv) < 5:
if not quiet: print ("Hit enter to continue with %s owner notification..." % listname), sys.stdin.readline()
# send the notice to the list owner
text = Utils.maketext(
'newlist.txt',
{'listname' : listname,
'password' : list_pw,
'admin_url' : mlist.GetScriptURL('admin', absolute=1),
'listinfo_url': mlist.GetScriptURL('listinfo', absolute=1),
'requestaddr' : "%s-request@%s" % (listname, mlist.host_name),
'hostname' : mlist.host_name,
})
msg = Message.UserNotification(owner_mail,
'mailman-owner@' + mlist.host_name,
'Your new mailing list: ' + listname,
text)
HandlerAPI.DeliverToUser(mlist, msg)
# send the notice to the list owner
text = Utils.maketext(
'newlist.txt',
{'listname' : listname,
'password' : list_pw,
'admin_url' : mlist.GetScriptURL('admin', absolute=1),
'listinfo_url': mlist.GetScriptURL('listinfo', absolute=1),
'requestaddr' : "%s-request@%s" % (listname, mlist.host_name),
'hostname' : mlist.host_name,
})
msg = Message.UserNotification(
owner_mail,
'mailman-owner@' + mlist.host_name,
'Your new mailing list: ' + listname,
text)
finally: mlist.Unlock()HandlerAPI.DeliverToUser(mlist, msg)
if __name__ == '__main__':
- main(sys.argv)
- main()
participants (3)
-
barry@digicool.com
-
Phil Barnett
-
Tanner Lovelace