[Mailman-Developers] Mailman MySQL adaptor - MySQLdb module error

Aaron Kreider aaron at campusactivism.org
Fri Aug 6 21:23:01 CEST 2010

  On 8/6/2010 1:34 AM, Mark Sapiro wrote:
> Aaron Kreider wrote:
>>   I'm trying to get the Mailman MySQL adaptor to work, while we're
>> waiting for Mailman 3 to be finished.  I'd love some help!
>> I followed the instructions on:
>> http://loeki.tv/log/archives/81-Setting-up-Mailman-to-store-members-in-a-MySQL-database.html
>> I have a VPS (virtual private server) running Centos, cPanel, and
>> Mailman 2.1.13.
> Did you install Mailman yourself or are you using cPanel's Mailman. If
> the latter, did you modify the paths in the above instructions to
> match cPanel.
> See the FAQ at<http://wiki.list.org/x/sYA9>.
Using cPanel's mailman. I modified the paths to fit the instructions.

>> I create a new list to test the adaptor.  When I go to the list's page
>> it gives me an error.  Mailman's error log says "ImportError: No module
>> named MySQLdb".
>> I've installed the MySQLdb module and am able to run a simple test
>> script at the command line (that connects to the mysql database),
>> without a problem.  So what could be the problem?
>> My setup has two versions of python running - one in /usr/bin/python and
>> another in /usr/bin/python2.4, however both of them run the test script
>> without a problem.
> In a typical CentOS RPM install, /usr/bin/python and /usr/bin/python2.4
> are hard links to the same file.
> How many /usr/lib/python* directories do you have?
Only one directory.

>> I'm wondering if having two versions might be the
>> cause?  Or could there be a user permissions issue?
> How was Mailman configured? Having two or even more versions of Python
> should not be a problem as long as the one Mailman was configured to
> use has MySQLdb installed.

I changed /user/local/cpanel/3rdparty/mailman/Mailman/mm_cfg.py to have 
my MySQL database settings:

# Put YOUR site-specific settings below this line.
MYSQL_MEMBER_DB_HOST = "localhost"

> Is Mailman running? What happens if you send a 'help' command by email
> to the new list's -request address?
Sending "help" does not work for the new list.

It does work for old lists (non-mysql based ones).

> I don't think this is a permissions issue as MySQLdb should be world
> searchable/readable, but I suppose it could be a SELinux issue if
> SELinux is enabled.
> If you run
> strings /path/to/mailman/cgi-bin/listinfo
> The output should contain amongst much other stuff the path of the
> python used by the CGI scripts.

This gives me an error message:
Content-type: text/html
<h1>Mailman CGI error!!!</h1>
<title>Mailman CGI error!!!</title>
The Mailman CGI wrapper encountered a fatal error.
This entry is being stored in your syslog:
Failure to find group name for GID %d.  Mailman
expected the %s wrapper to be executed as group
"%s", but the system's %s server executed the
wrapper as GID %d for which the name could not be
found.  Try adding GID %d to your system as "%s",
or tweak your %s server to run the wrapper as group
Group mismatch error.  Mailman expected the %s
wrapper script to be executed as group "%s", but
the system's %s server executed the %s script as
group "%s".  Try tweaking the %s server to run the
script as group "%s", or re-run configure,
providing the command line option `%s=%s'.
Mailman cgi-wrapper (listinfo)

More information about the Mailman-Developers mailing list