[Mailman-Developers] Fixed problem at gnu.org, patch included (was Re: Errors in mailman that I cannot figure out)
Bradley M. Kuhn
bkuhn@gnu.org
Wed, 22 Nov 2000 12:46:20 -0500
--8tUgZ4IE8L4vmMyh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
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 ####
--8tUgZ4IE8L4vmMyh
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE6HAZr53XjJNtBs4cRAmgTAJ4zQeFCa3xpnFK31auM+IMRkymMIgCdF5Hj
aBqPjNlRvGvBnb3Dwmz6thk=
=WgRu
-----END PGP SIGNATURE-----
--8tUgZ4IE8L4vmMyh--