Thursday, May 15. 2008Setting up Mailman to store members in a MySQL databaseTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Some years ago I've implemented the same for a PostgreSQL database. I had problems with correct bounce processing, which I were able to fix. Unfortunately the Mailman developers were not very interested in it, so the patch probably never made it into upstream source.
If you encounter bounce processing problems too, just drop me a line.
I haven't run the thing in production yet so we'll see how that pans out.
I have followed the instructions and it is able to create/modify a table of members, but when a member posts to the list, the other members don't recieve the emails. what can i be missing?
without the addition of the mysqlmemberships file and the extend file, it works just fine.
I am using FC6 and sendmail with mailman.
Anyone have any suggestions?
Perhaps you need to restart the Mailman qrunner? It's hard to diagnose from here...
Thanks for the quick reply!
I found that it asks the moderator for approval because it believes that the message came from a non-user. The email a message comes from IS a user, however, even as seen by mailman's user moderation page. I can update info in the mysql database and mailman will change to reflect that info.
Even after the moderator clicks to accept, however, the message is still not sent.
I will continue playing with it. If you have any further helpful ideas or hints(or even good things to search for on google) I will be happy to check it out!
Thanks again!
There's now an updated version of MysqlMemberAdaptor and a patch for mailman's Bouncer.py that appear to resolve the issues with bounce handling.
Hi
I would like to know more about the Postgre adaptor for mailman? I need it for a mailman project I am working on which needs to abstract the mailman data for postgre database.
Can I take a look at your code?
Hi Thijs,
One line that should also be added to mm_cfg.py:
MYSQL_MEMBER_CREATE_TABLE = "yes"
After that, it works fine for me.
Thanks again!
Ah yes, that is necessary if you use the per-list table and didn't create the table yourself.
I did exactly what you have said and every time I try to log into the list admin page i get an error. Then i remove the extend.py file and everything is fine. what am I doing wrong?
I can't give any useful advice on that when just knowing that you get "an error".
You need to install the MYSQLdb module.
on debian :
# atp-get install python-mysqldb
i have python-mysqldb installed. when i run apt-get install python-mysqldb it says that it is already installed but when i look at the logs it says: admin(3698): import MySQLdb
admin(3698): ImportError: No module named MySQLdb
In the MysqlMemberships.py Insert this:
"
sys.path.append('/var/lib/python-support/python2.5')
"
before this line: import MySQLdb
If you use mysql auth from postfix, insert this to /etc/postfix/main.cf:
"
transport_maps = hash:/etc/postfix/transport
mailman_destination_recipient_limit = 1
"
after, make /etc/postfix/transport content ex:
"
lists.example.com mailman:
"
and command:
postmap transport
!!The postfix+mysql is only work good, if your maillist domain is backup-mx!!
plus: If you do not like create manually the /var/lib/mailman/lists/"listname"/extend.py file, do this:
copy the extend.py to /usr/lib/mailman/Mailman/ and insert line to the /usr/lib/mailman/bin/newlist line 232:
"""before line: msg.send(mlist)"""
os.symlink('/usr/lib/mailman/Mailman/extend.py', os.path.join('/var/lib/mailman/lists/', listname, 'extend.py' ))
"""after line: finally:"""
ps: whitespace is significant in Python ;)
"msg.send(mlist)" is in line 251 and "finally" is in next one. Did you mean _after_ "msg.send" and _before_ "finally"?
I keep getting error "Table 'mylist' already exists" to mailman admin mail. Why's that? My list table exists and there are users inside and everything works like it should. I also see that in msql py script there is query CREATE TABLE IF NOT EXISTS, so this error report doesn't make sense.
Can't get mysqldb module to be recognized. I downloaded from sourceforge (http://sourceforge.net/project/shownotes.php?release_id=491012&group_id=22307) , unpacked and ran install in dir: /usr/local/cpanel/3rdparty/mailman
I am getting these errors from mailman log...
Do I need to install to another directory?
-------------------------------
admin(30098): [----- Mailman Version: 2.1.11.cp3 -----]
admin(30098): [----- Traceback ------]
admin(30098): Traceback (most recent call last):
admin(30098): File "/usr/local/cpanel/3rdparty/mailman/scripts/driver", line 101, in run_main
admin(30098): main()
admin(30098): File "/usr/local/cpanel/3rdparty/mailman/Mailman/Cgi/admin.py", line 71, in main
admin(30098): mlist = MailList.MailList(listname, lock=0)
admin(30098): File "/usr/local/cpanel/3rdparty/mailman/Mailman/MailList.py", line 115, in __init__
admin(30098): execfile(filename, dict)
admin(30098): File "/usr/local/cpanel/3rdparty/mailman/lists/mysqltest_umem.org/extend.py", line 1, in ?
admin(30098): from Mailman.MysqlMemberships import MysqlMemberships
admin(30098): File "/usr/local/cpanel/3rdparty/mailman/Mailman/MysqlMemberships.py", line 46, in ?
admin(30098): import MySQLdb
admin(30098): ImportError: No module named MySQLdb
You need to put : MYSQL_MEMBER_CREATE_TABLE = "yes" before you start using MySQL for Mailman as one already said.
After first visiting "web admin - membership managment" the table for your list in mysql db is created and you need to remove this setting from mm_cfg.py. If you don't do that, you'll get errors I described before: "Table 'mylist' already exists"
I get this error with mailman 2.1.16
Traceback (most recent call last):
File "/var/lib/mailman/bin/list_lists", line 121, in
main()
File "/var/lib/mailman/bin/list_lists", line 94, in main
mlist = MailList.MailList(n, lock=0)
File "/var/lib/mailman/Mailman/MailList.py", line 115, in __init__
execfile(filename, dict)
File "/var/lib/mailman/lists/mysql_test/extend.py", line 2, in
from Mailman.MysqlMemberships import MysqlMemberships
File "/var/lib/mailman/Mailman/MysqlMemberships.py", line 1
^
SyntaxError: invalid syntax
* Site list for mailman missing (looking for list named 'mailman').
* Please create it; until then, mailman will refuse to start.
what's wrong.. I am quite sure I did all the steps.
|
QuicksearchBlogroll |