C Nulk wrote: > >Is there anyway to modify the member adaptor to make sure everything it >stores in memory is lowercase when it loads via __ldap_load_members()? >And when it comes to the checking if an address is member, convert it to >lowercase prior to checking? Since everything should be in lowercase, >it should find if an address is a member or not. > >Alternatively, if you, or anyone else, would like to take this offline >and help me make the changes, I will do changes and testing and once >working, post the code back to the list.
You could try the following. I haven't studied the member adaptor in detail to be certain it will work, but I think it's worth a try. In the definition of __ldap_load_members(self), you will see these two lines for maddr in attrs['mail']: self.__member_map[maddr.strip()] = mail They are indented with tabs which is not good, but it will be OK as long as you preserve the existing tabs. I have replaced the tabs with some spaces for this email, but what you need to do is just insert the string '.lower()' in the second line so it becomes self.__member_map[maddr.strip().lower()] = mail without changing the tabbing. -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9