[Mailman-Users] Problem with Underscores
Mark Sapiro
mark at msapiro.net
Sun Jul 27 17:43:29 CEST 2008
David Relson wrote;
>I'm running Mailman 2.1.8 and have encountered a problem with email
>addresses starting with underscores.
>
>Using a python script to show list members, the first three members of
>a list are:
>
> 6louisc at example.com
> _santasal at example.com
> a1bformk at example.com
>
>Using mailman's admin interface, web page
>
> http://localhost/mailman/admin/mylist/members
>
>has the following:
>
> 219 members total, 1 shown
> [6] A B C D E F G H I J K L M N O P Q R S T U V W Y Z
>
>Note that the script shows a user whose name begins with an underscore
>but the admin interface indicates names beginning with "6" and "A" but
>none with "_".
>
>Is there a patch that fixes this? If not, I'll create one if
>somebody can point me towards the admin module that determines the
>"6ABC..." list above?
Thanks for the report. This bug still exists in 2.1.11. The following
patch is totally untested, but I think it will fix it for '_'. I'll
have to think about other non-alphanumeric characters. At least it
will point to the right place in the code.
Note that if you know there is an address with a leading '_', you can
display it with a find pattern of '^_', but this doesn't help if you
don't know. Also, if you didn't have the '6' address, the '_' address
would display on the default page.
Here's the patch:
--- Mailman/Cgi/admin.py 2007-05-08 03:16:04 +0000
+++ Mailman/Cgi/admin.py 2008-07-27 15:33:11 +0000
@@ -902,7 +902,7 @@
if qsenviron:
qs = cgi.parse_qs(qsenviron)
bucket = qs.get('letter', 'a')[0].lower()
- if bucket not in digits + lowercase:
+ if bucket not in digits + '_' + lowercase:
bucket = None
if not bucket or not buckets.has_key(bucket):
keys = buckets.keys()
@@ -942,7 +942,7 @@
# Add the alphabetical links
if bucket:
cells = []
- for letter in digits + lowercase:
+ for letter in digits + '_' + lowercase:
if not buckets.get(letter):
continue
url = adminurl + '/members?letter=%s' % letter
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list