[Mailman-Users] ImportError: No module named ldap

Luke Daly Luke.Daly at newcastle.edu.au
Thu Jul 26 04:27:15 CEST 2007

This is going to sound really dumb. and is. Just started using mailman.
Have quite a few large lists all moderated by different people
(academics at university so limited user ability) Basically i want to
create a generic setup and have all new lists have this setup. Or if
possible a few basic setups (i.e. no posting to newsletter etc) Also I'm
attempting to change one of my lists to be so only moderators can post
to. I think i must be broken i just cant find how to do it.

Luke Daly
Systems Officer
IT Infrastructure
Newcastle University


>>> Mike Rosile <mike.rosile at interzonegames.com> 26/07/2007 6:52 am
I'm trying to write to implement LDAPMemberships v3 using Mailman
v2.1.9, but I keep getting an error in the Mailman error log that says
"ImportError: No module named ldap".

For the record, I can import 'ldap' (aka python-ldap) from a regular
python script (from the command line).

I know Mailman uses a cgi wrapper for python, could this be part of

Any help would greatly be appreciated!

Below is some relevant output from /var/log/mailman/error, if you need
additional info, please let me know.

Jul 25 15:46:53 2007 admin(12280):
admin(12280): [----- Mailman Version: 2.1.9 -----]
admin(12280): [----- Traceback ------]
admin(12280): Traceback (most recent call last):
admin(12280):   File "/var/lib/mailman/scripts/driver", line 110, in
admin(12280):     main()
admin(12280):   File "/usr/lib/mailman/Mailman/Cgi/admin.py", line 66,
in main
admin(12280):     admin_overview()
admin(12280):   File "/usr/lib/mailman/Mailman/Cgi/admin.py", line
in admin_overview
admin(12280):     mlist = MailList.MailList(name, lock=0)
admin(12280):   File "/var/lib/mailman/Mailman/MailList.py", line 115,
in __init__
admin(12280):     execfile(filename, dict)
admin(12280):   File "/var/lib/mailman/lists/sgftest/extend.py", line
in ?
admin(12280):     from Mailman.LDAPMemberships import LDAPMemberships
admin(12280):   File "/var/lib/mailman/Mailman/LDAPMemberships.py",
85, in ?
admin(12280):     import ldap
admin(12280): ImportError: No module named ldap
admin(12280): [----- Python Information -----]
admin(12280): sys.version     =   2.4.4c1 (#2, Oct 11 2006, 20:00:03)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)]
admin(12280): sys.executable  =   /usr/bin/python
admin(12280): sys.prefix      =   /usr
admin(12280): sys.exec_prefix =   /usr
admin(12280): sys.path        =   /usr
admin(12280): sys.platform    =   linux2
admin(12280): [----- Environment Variables -----]
admin(12280):   AUTH_TYPE: Basic
admin(12280):   force_response_1_0: 1
admin(12280):   HTTP_COOKIE: userwdth=null; userfontsz=null;
admin(12280):   SERVER_SOFTWARE: Apache/2.0.55 (Ubuntu) DAV/2
mod_python/3.3.1 Python/2.4.4c1 PHP/5.1.6 mod_ssl/2.0.55
mod_perl/2.0.2 Perl/v5.8.8
admin(12280):   SCRIPT_NAME: /mailman/admin
admin(12280):   SERVER_SIGNATURE:
admin(12280):   REQUEST_METHOD: GET
admin(12280):   SERVER_PROTOCOL: HTTP/1.1
admin(12280):   QUERY_STRING:
admin(12280):   HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR
2.0.50727; .NET CLR 3.0.04506.30; InfoPath.2)

Mailman-Users mailing list
Mailman-Users at python.org 
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py 
Searchable Archives:

Security Policy:

More information about the Mailman-Users mailing list