[Mailman-Users] LDAP and case-sensitive memberlist
mark at msapiro.net
Thu Mar 19 01:32:32 CET 2009
----- Original Message ---------------
Subject: [Mailman-Users] LDAP and case-sensitive memberlist
From: "Chris Nulk" <CNulk at scu.edu>
Date: Tue, 17 Mar 2009 14:22:59 -0700
To: <mailman-users at python.org>
>I have recently set up Mailman v2.1.19 and added the LDAPMemberAdaptor I picked up from
>I did check the FAQ and search the list for the LDAP stuff. I configured it as per the docs and it works fine. When I look at the member list (via Mailman's web interface), all the email addresses are there with proper capitalization (it is how it is defined in our LDAP and I CANNOT change the LDAP entries).
>The problem is when anyone sends to the list, their posts are held for moderation because they are not a member of the list. I have looked at the detailed message source on the moderator's page to view the message source. It shows the sender's email address with the correct capitalization. However, Mailman appears to be comparing a lowercase version of the sender's email address to the properly capitalized member list derived from the LDAPMemberAdapter.
>Is there a way to force the comparison to be case-insensitive? Or, modify the LDAPMemberAdaptor to lowercase all the email addresses?
This particular member adaptor assumes all email addresses in the LDAP
database are lower case. Mailman itself has the concept of a "case
preserved email" (CPE) and a "lower case email" (LCE) It uses the LCE
as the key to look up a CPE or to verify if an LCE is a member. The
member adaptor you are using doesn't distinguish between LCE and CPE
and it only works if the email addresses in the LDAP database are
In order to fix it, you would first need to have a way of finding the
correct record in the LDAP database given only the LCE as a key. Since
the member adaptor seems (via its __ldap_load_members() method) to
keep all the list member emails in memory anyway, you could augment
that method to build another dictionary with LCE as key and CPE as
data and use that.
Then you would need to modify the member adaptor to do what it's
supposed to do. It seems to preserve the doc strings which define what
the methods should do. You'd just need to make them do that.
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