Errors in mailman that I cannot figure out

I am writing on behalf of the GNU project. We have an discovered some sort of bug in mailman. The .../logs/errors file is getting:
Nov 22 11:24:01 2000 qrunner(29262): Traceback (innermost last): Nov 22 11:24:01 2000 qrunner(29262): File "/home/mailman/cron/qrunner", line 278, in ? Nov 22 11:24:01 2000 qrunner(29262): kids = main(lock) Nov 22 11:24:01 2000 qrunner(29262): File "/home/mailman/cron/qrunner", line 247, in main Nov 22 11:24:01 2000 qrunner(29262): keepqueued = dispose_message(mlist, msg, msgdata) Nov 22 11:24:01 2000 qrunner(29262): File "/home/mailman/cron/qrunner", line 121, in dispose_message Nov 22 11:24:01 2000 qrunner(29262): if BouncerAPI.ScanMessages(mlist, mimemsg): Nov 22 11:24:01 2000 qrunner(29262): File "/com/mailer/mailman/Mailman/Bouncers/BouncerAPI.py", line 59, in ScanMessages Nov 22 11:24:01 2000 qrunner(29262): addrs = func(msg) Nov 22 11:24:01 2000 qrunner(29262): File "/com/mailer/mailman/Mailman/Bouncers/Catchall.py", line 132, in process Nov 22 11:24:01 2000 qrunner(29262): username = string.split(line)[1] Nov 22 11:24:01 2000 qrunner(29262): IndexError : list index out of range
This was happening with 2.0beta6, so I upgraded to see if it's a bug fixed by 2.0, but it isn't.
I think this may be related to a particular file in the queue being formatted oddly, but the result is the entire queue is held up.
I am looking a bit deeper into the code right now, but I'd appreciate help. (Mailing lists at gnu.org are currently down becasue of this bug).
I will send more information as I discover it.

Bradley M. Kuhn bkuhn@gnu.org wrote:
I am writing on behalf of the GNU project. We have an discovered some sort of bug in mailman. The .../logs/errors file is getting:
Nov 22 11:24:01 2000 qrunner(29262): Traceback (innermost last): Nov 22 11:24:01 2000 qrunner(29262): File "/home/mailman/cron/qrunner", line 278, in ? Nov 22 11:24:01 2000 qrunner(29262): kids = main(lock) Nov 22 11:24:01 2000 qrunner(29262): File "/home/mailman/cron/qrunner", line 247, in main Nov 22 11:24:01 2000 qrunner(29262): keepqueued = dispose_message(mlist, msg, msgdata) Nov 22 11:24:01 2000 qrunner(29262): File "/home/mailman/cron/qrunner", line 121, in dispose_message Nov 22 11:24:01 2000 qrunner(29262): if BouncerAPI.ScanMessages(mlist, mimemsg): Nov 22 11:24:01 2000 qrunner(29262): File "/com/mailer/mailman/Mailman/Bouncers/BouncerAPI.py", line 59, in ScanMessages Nov 22 11:24:01 2000 qrunner(29262): addrs = func(msg) Nov 22 11:24:01 2000 qrunner(29262): File "/com/mailer/mailman/Mailman/Bouncers/Catchall.py", line 132, in process Nov 22 11:24:01 2000 qrunner(29262): username = string.split(line)[1] Nov 22 11:24:01 2000 qrunner(29262): IndexError : list index out of range
I have fixed this bug. It had to do with regexes that weren't precise in Catchall.py.
Here's a patch. I also made a ChangeLog, because you all don't appear to have one yet!
############################################################################### # Fixed bug with Catchall regexs # # To apply this patch: # STEP 1: Chdir to the source directory. # STEP 2: Run the 'applypatch' program with this patch file as input. # # If you do not have 'applypatch', it is part of the 'makepatch' package # that you can fetch from the Comprehensive Perl Archive Network: # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz # In the above URL, 'x' should be 2 or higher. # # To apply this patch without the use of 'applypatch': # STEP 1: Chdir to the source directory. # If you have a decent Bourne-type shell: # STEP 2: Run the shell with this file as input. # If you don't have such a shell, you may need to manually create # the files as shown below. # STEP 3: Run the 'patch' program with this file as input. # # These are the commands needed to create/delete files/directories: # touch 'ChangeLog' chmod 0600 'ChangeLog' # # This command terminates the shell and need not be executed manually. exit # #### End of Preamble ####
#### Patch data follows #### diff -u /dev/null 'mailman/ChangeLog' Index: ./ChangeLog *** ./ChangeLog Wed Dec 31 19:00:00 1969 --- ./ChangeLog Wed Nov 22 12:01:37 2000
*** 0 **** --- 1,4 ----
- 2000-11-22 Bradley M. Kuhn bkuhn@gnu.org
- Mailman/Bouncers/Catchall.py (process): changed some of the
- "messy" regular expressions so errors don't occur
diff -u 'mailman-pristine/Mailman/Bouncers/Catchall.py' 'mailman/Mailman/Bouncers/Catchall.py' Index: ./Mailman/Bouncers/Catchall.py --- ./Mailman/Bouncers/Catchall.py Sun Aug 6 22:34:33 2000 +++ ./Mailman/Bouncers/Catchall.py Wed Nov 22 12:02:52 2000 @@ -102,9 +102,12 @@ (regex.compile('.*%s: User unknown.*' % email_regexp), REMOVE), (regex.compile('.*%s... User unknown' % email_regexp), REMOVE)) # patterns we can't directly extract the email (special case these)
- messy_pattern_1 = regex.compile('^Recipient .*$')
- messy_pattern_2 = regex.compile('^Addressee: .*$')
- messy_pattern_3 = regex.compile('^User .* not listed.*$')
- # Make sure that these patterns will not cause the special cases below
- # to fail. In other words, be sure that these regexs ensure that split's
- # and other operations done below will always work.
- messy_pattern_1 = regex.compile('^Recipient[ \t]+[^ \t]+[ \t]*$')
- messy_pattern_2 = regex.compile('^Addressee:[ \t]*[^ \t]+[ \t]*$')
- messy_pattern_3 = regex.compile('^User [^ \t]+ not listed.*$') messy_pattern_4 = regex.compile('^550 [^ ]+... User unknown.*$') messy_pattern_5 = regex.compile('^User [^ ]+ is not defined.*$') messy_pattern_6 = regex.compile('^[ \t]*[^ ]+: User unknown.*$')
#### End of Patch data ####
#### ApplyPatch data follows #### # Data version : 1.0 # Date generated : Wed Nov 22 12:25:09 2000 # Generated by : makepatch 2.00 # Recurse directories : Yes # Excluded files : (\A|.*/)CVS(/.*|\Z) # (\A|.*/)RCS(/.*|\Z) # ,v\Z # (\A|.*/)SCCS(/.*|\Z) # (\A|.*/)[sp]..+\Z # c 'ChangeLog' 0 974912497 0100600 # p 'Mailman/Bouncers/Catchall.py' 7873 974912572 0100600 #### End of ApplyPatch data ####
#### End of Patch kit [created: Wed Nov 22 12:25:09 2000] #### #### Checksum: 78 3275 60184 ####
participants (1)
-
Bradley M. Kuhn