![](https://secure.gravatar.com/avatar/713c77738ea17436c889d382110b7619.jpg?s=120&d=mm&r=g)
Hello.
I'm trying to make Mailman to work with Mysql database. I followed this instructions: http://goo.gl/QkTso and in mail log this is the last line:
postfix/local[13381]: AA4B9B38235: to=<clani@xxxxx.xx>, relay=local, delay=0.39, delays=0.02/0.04/0/0.34, dsn=2.0.0, status=sent (delivered to command: /usr/lib/mailman/mail/mailman post clani)
But emails are not send to list members. If I change it back to "file based db" (remove extend.py) mails are delivered.
I'm using Mailman version 2.1.9 on CentOS. There is nothing in the Mailman logs. I can see that queries in mysql are executed and I also tested connection to Mysql from python. Everything works, just mails are not send to members.
Can someone help me please?
--
Klemen Humerca [www.humerca.com|klemen@humerca.com]
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Klemen Humerca wrote:
Do you mean the web admin interface works and lists members with the extend.py file in place?
If there is nothing in the logs, you aren't looking at the right logs. If this is the RedHat RPM packaged Mailman, logs are in /var/log/mailman.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/713c77738ea17436c889d382110b7619.jpg?s=120&d=mm&r=g)
Yes, web admin interface works and extend.py is in the place (/var/lib/mailman/lists/list-name). And I've been checking logs in /var/log/mailman. I've added this line to mm_cfg.py:
MYSQL_MEMBER_DB_VERBOSE = "4"
and I've found this in error log:
Aug 31 13:03:14 2011 (16396) Uncaught runner exception: (1064, "You have
an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near 'TYPE=MyISAM' at
line 24")
Aug 31 13:03:14 2011 (16396) Traceback (most recent call last):
File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 113, in _oneloop
self._onefile(msg, msgdata)
File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 151, in _onefile
mlist = self._open_list(listname)
File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 196, in _open_list
mlist = MailList.MailList(listname, lock=False)
File "/usr/lib/mailman/Mailman/MailList.py", line 125, in __init__
func(self)
File "/var/lib/mailman/lists/clani/extend.py", line 6, in extend
list._memberadaptor = MysqlMemberships(list)
File "/usr/lib/mailman/Mailman/MysqlMemberships.py", line 92, in __init__
message = "MysqlMemberships "
File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 163,
in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line
35, in defaulterrorhandler
raise errorclass, errorvalue
ProgrammingError: (1064, "You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near 'TYPE=MyISAM' at line 24")
Aug 31 13:03:14 2011 (16396) SHUNTING:
1314788594.28422+2ce0db1b09dddbc0a14b8eaa0701fa568dcd9196
Aug 31 13:03:14 2011 qrunner(16396): Exception
exceptions.AttributeError : "MysqlMemberships instance has no attribute
'conn'" in <bound method MysqlMemberships.__del__ of
<Mailman.MysqlMemberships.MysqlMemberships instance at 0x9e07d0c>> ignored
It looks like there is something wrong in MysqlMemberships.py file? I've checked the file but there is not 'TYPE=MyISAM' in it....
Klemen Humerca
( klemen@humerca.com | www.humerca.com)
Dne 31.8.2011 20:07, piše Mark Sapiro:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 8/31/2011 12:15 PM, Klemen Humerca wrote:
Lines 90 through 97 of the MysqlMemberships.py I think you are using say
if mm_cfg.MYSQL_MEMBER_DB_VERBOSE:
# Message to indicate successful init.
message = "MysqlMemberships " \
+ "$Revision: 1.69 $ initialized with host: %s (%s)" % (
mm_cfg.connection.get_host_info(),
mm_cfg.connection.get_server_info() )
syslog('error', message)
syslog('mysql', message)
Lines 92 through 95 are one long statement. There is something wrong with the mm_cfg.connection object. This should be a MySQL database connection established earlier by the call to self._dbconnect() at line 67. This in turn did
try:
mm_cfg.connection = MySQLdb.connect(
passwd=mm_cfg.MYSQL_MEMBER_DB_PASS,
db=mm_cfg.MYSQL_MEMBER_DB_NAME,
user=mm_cfg.MYSQL_MEMBER_DB_USER,
host=mm_cfg.MYSQL_MEMBER_DB_HOST)
mm_cfg.cursor = mm_cfg.connection.cursor()
There is probably some issue with your definitions of MYSQL_MEMBER_DB_PASS, MYSQL_MEMBER_DB_NAME, MYSQL_MEMBER_DB_USER and/or MYSQL_MEMBER_DB_HOST in mm_cfg.py
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Klemen Humerca wrote:
Do you mean the web admin interface works and lists members with the extend.py file in place?
If there is nothing in the logs, you aren't looking at the right logs. If this is the RedHat RPM packaged Mailman, logs are in /var/log/mailman.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/713c77738ea17436c889d382110b7619.jpg?s=120&d=mm&r=g)
Yes, web admin interface works and extend.py is in the place (/var/lib/mailman/lists/list-name). And I've been checking logs in /var/log/mailman. I've added this line to mm_cfg.py:
MYSQL_MEMBER_DB_VERBOSE = "4"
and I've found this in error log:
Aug 31 13:03:14 2011 (16396) Uncaught runner exception: (1064, "You have
an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near 'TYPE=MyISAM' at
line 24")
Aug 31 13:03:14 2011 (16396) Traceback (most recent call last):
File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 113, in _oneloop
self._onefile(msg, msgdata)
File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 151, in _onefile
mlist = self._open_list(listname)
File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 196, in _open_list
mlist = MailList.MailList(listname, lock=False)
File "/usr/lib/mailman/Mailman/MailList.py", line 125, in __init__
func(self)
File "/var/lib/mailman/lists/clani/extend.py", line 6, in extend
list._memberadaptor = MysqlMemberships(list)
File "/usr/lib/mailman/Mailman/MysqlMemberships.py", line 92, in __init__
message = "MysqlMemberships "
File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 163,
in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line
35, in defaulterrorhandler
raise errorclass, errorvalue
ProgrammingError: (1064, "You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near 'TYPE=MyISAM' at line 24")
Aug 31 13:03:14 2011 (16396) SHUNTING:
1314788594.28422+2ce0db1b09dddbc0a14b8eaa0701fa568dcd9196
Aug 31 13:03:14 2011 qrunner(16396): Exception
exceptions.AttributeError : "MysqlMemberships instance has no attribute
'conn'" in <bound method MysqlMemberships.__del__ of
<Mailman.MysqlMemberships.MysqlMemberships instance at 0x9e07d0c>> ignored
It looks like there is something wrong in MysqlMemberships.py file? I've checked the file but there is not 'TYPE=MyISAM' in it....
Klemen Humerca
( klemen@humerca.com | www.humerca.com)
Dne 31.8.2011 20:07, piše Mark Sapiro:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 8/31/2011 12:15 PM, Klemen Humerca wrote:
Lines 90 through 97 of the MysqlMemberships.py I think you are using say
if mm_cfg.MYSQL_MEMBER_DB_VERBOSE:
# Message to indicate successful init.
message = "MysqlMemberships " \
+ "$Revision: 1.69 $ initialized with host: %s (%s)" % (
mm_cfg.connection.get_host_info(),
mm_cfg.connection.get_server_info() )
syslog('error', message)
syslog('mysql', message)
Lines 92 through 95 are one long statement. There is something wrong with the mm_cfg.connection object. This should be a MySQL database connection established earlier by the call to self._dbconnect() at line 67. This in turn did
try:
mm_cfg.connection = MySQLdb.connect(
passwd=mm_cfg.MYSQL_MEMBER_DB_PASS,
db=mm_cfg.MYSQL_MEMBER_DB_NAME,
user=mm_cfg.MYSQL_MEMBER_DB_USER,
host=mm_cfg.MYSQL_MEMBER_DB_HOST)
mm_cfg.cursor = mm_cfg.connection.cursor()
There is probably some issue with your definitions of MYSQL_MEMBER_DB_PASS, MYSQL_MEMBER_DB_NAME, MYSQL_MEMBER_DB_USER and/or MYSQL_MEMBER_DB_HOST in mm_cfg.py
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Klemen Humerca
-
Mark Sapiro