[Mailman-Developers] Bug in GatewayManager.py, 1.0rc2

Ben Gertzfield che@debian.org
25 Jun 1999 16:02:19 -0700


I'm not subscribed to this list, so please Cc: me on any replies.
I hope this is the right place to send bug reports.

Anyway, the bug looks like a think-o in GatewayManager.py:

== 8< cut here 8< ==

Bug in Mailman version 1.0rc2

We're sorry, we hit a bug!

If you would like to help us identify the problem, please email a copy of
this page to the webmaster for this site with a description of what
happened. Thanks!

Traceback:

Traceback (innermost last):
  File "/var/lib/mailman/scripts/driver", line 112, in run_main
    main()
  File "/usr/lib/mailman/Mailman/Cgi/admindb.py", line 112, in main
    HandleRequests(doc)
  File "/usr/lib/mailman/Mailman/Cgi/admindb.py", line 200, in HandleRequests
    list.HandleRequest(request, v, form[comment_key].value)
  File "/usr/lib/mailman/Mailman/ListAdmin.py", line 122, in HandleRequest
    self.HandlePostRequest(request_data[2:], value, comment)
  File "/usr/lib/mailman/Mailman/ListAdmin.py", line 131, in HandlePostRequest
    self.Post(msg, 1)
  File "/usr/lib/mailman/Mailman/MailList.py", line 1285, in Post
    self.SendMailToNewsGroup(msg)
  File "/usr/lib/mailman/Mailman/GatewayManager.py", line 143, in SendMailToNewsGroup
    msg.SetHeader('Subject', '%s(no subject)' % prefix)
NameError: prefix

  ------------------------------------------------------------------------

Environment variables:

 Variable            Value
 DOCUMENT_ROOT       /var/www/sluglug
 UNIQUE_ID           N3QIwYByMfAAAC2oPIw
 HTTP_ACCEPT_ENCODINGgzip
 CONTENT_LENGTH      315
 CONTENT_TYPE        application/x-www-form-urlencoded
 PATH_TRANSLATED     /var/www/sluglug/sluglug
 REMOTE_ADDR         198.4.83.36
 GATEWAY_INTERFACE   CGI/1.1
 HTTP_COOKIE         sluglug:admin="(lp0\012S'198.4.83.36'\012p1\012aI930351160\012aI930361960\012aI-1683555072\012a."
 SERVER_PROTOCOL     HTTP/1.0
 HTTP_ACCEPT_LANGUAGEen
 REMOTE_PORT         4012
 SERVER_PORT         80
 HTTP_CONNECTION     Keep-Alive
 HTTP_USER_AGENT     Mozilla/4.5 [en] (X11; I; Linux 2.2.10 i586)
 HTTP_ACCEPT_CHARSET iso-8859-1,*,utf-8
 HTTP_ACCEPT         image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
 REQUEST_URI         /mailman/admindb/sluglug
 PATH                /bin:/usr/bin:/sbin:/usr/sbin
 QUERY_STRING
 SCRIPT_FILENAME     /usr/lib/mailman/cgi-bin/admindb
 PATH_INFO           /sluglug
 HTTP_HOST           sluglug.ucsc.edu
 REQUEST_METHOD      POST
 SERVER_SIGNATURE
 SCRIPT_NAME         /mailman/admindb
 SERVER_ADMIN        ben@cse.ucsc.edu
 SERVER_SOFTWARE     Apache/1.3.3 (Unix) Debian/GNU
 PYTHONPATH          /var/lib/mailman
 HTTP_REFERER        http://sluglug.ucsc.edu/mailman/admindb/sluglug
 SERVER_NAME         sluglug.ucsc.edu
Content-type: text/html

Database Updated...

  ------------------------------------------------------------------------

Administrative requests for 'Sluglug' mailing list

View or edit the list configuration information

There are no pending requests.

  ------------------------------------------------------------------------
Sluglug list run by che@debian.org

[Delivered by Mailman] v 1.0rc2

== 8< cut here 8< ==

Here's a patch that might fix this. I'm not sure, but at a quick
glance this might solve the problem:

--- GatewayManager.py.orig      Fri Jun 25 15:56:06 1999
+++ GatewayManager.py   Fri Jun 25 15:56:52 1999
@@ -140,7 +140,7 @@
                 if not re.match('(re:? *)?' + re.escape(subjpref), subj, re.I):
                     msg.SetHeader('Subject', '%s%s' % (subjpref, subj))
             else:
-                msg.SetHeader('Subject', '%s(no subject)' % prefix)
+                msg.SetHeader('Subject', '%s(no subject)' % subjpref)
             if self.reply_goes_to_list:
                 del msg['reply-to']
                 msg.headers.append('Reply-To: %s\n' % self.GetListEmail())

Ben Gertzfield

-- 
Brought to you by the letters S and D and the number 2.
"Sculch is junk."
Debian GNU/Linux maintainer of Gimp and GTK+ -- http://www.debian.org/