[Mailman-Users] problem with web admin interface

Joe curly at apollo.wuacc.edu
Thu Oct 5 17:31:08 CEST 2000


I was wanting to add a custom welcome message to a dozen lists that had
foolishly already be created, so I did some checking and found that each
list's database is stored in a file called config.db which is what python
calls a marshal object.  So I found the docs for marshal and cooked up a
routine to add my own stuff. Here's what the code looks like:
import marshal,os

def main(argv):
    if len(sys.argv) < 2:
        print "Usage: update.py [ hostname ]"

# create a list of lists

	l = os.listdir(path)

# go to the list and load its database
# you can pluck out any part that you want or print all keys and values to
# find out the structure
	for k in l:
		config = open(path + "/" + k + "/config.db","r")
		m = marshal.load(config)
		real_name = m['real_name']

# I couldn't get python to write my changes with the single open because
# it was read-only. So I closed that one and open a writable file object
# made my changes and saved the stuff
		g = open(config,"w")

		m['welcome_msg'] = "any welcome that you want"
		m['msg_footer']	 = "footer of your choice"

# add members, but I wouldn't recommend it on existing lists

		g['members'] = {'curly at apollo.wuacc.edu': 8}

if __name__ == "__main__":
	hostname = sys.argv[1]
	path = "/home/mailman/lists"

It may not look pretty, by it works.  Maybe you'll find it useful.


On Wed, 4 Oct 2000, Support wrote:

> Hi all,
> Yeah, yeah, poke all the fun you want, I hit send accidentally.  Anyway,
> I've got a problem with the web based admin interface.  Is there anyway to
> add headers and footer text to outgoing emails without using the web
> interface?  I want to add a formatted footer that is much larger than the
> text input boxes allow.  I looked through the config.db, found the actual
> data that I need to change, but I can't figure out what sort of DB file it
> is.  Is there anyway to make manual changes to the footer and then push them
> into the config.db file for that specific mailing list?
> Thanks in advance,
> -Kevin
> mailman-2.0beta6
> Sendmail 8.9.3/8.8.7
> Linux kernel 2.2.5-22
> ------------------------------------------------------
> Mailman-Users maillist  -  Mailman-Users at python.org
> http://www.python.org/mailman/listinfo/mailman-users

More information about the Mailman-Users mailing list