[Mailman-Users] HOWTO: Change the footer (and other settings) via command line

Luigi Rosa lrosa at venus.it
Sat Dec 15 12:34:06 CET 2001


Hoping that someone is intereresd in changing some settings of a list via 
command line, I post this micro-HOWTO.
I wish to thank Tjalling Kikkert for his help in solving this issue.


FILE xmf.py (put it in Mailman/bin)

import sys
import string

def xmf(mlist):

	fp = open( '/tmp/zz' )	
	newfooter = fp.read()
	fp.close()

         mlist.msg_footer = newfooter
         mlist.Save()



This file reads the content of /tmp/zz and store it in the footer of a 
list. I tried to read the stdin, but the system added some nasty characters 
and I didn't want to filter them out.

To change the footer you must create the /tmp/zz file, and then issue the 
command

	/home/mailman/bin/withlist -l -r xmf [maillistname]



For the amusement of my friends, I have cron-ed each hour this command:

echo "--  " > /tmp/zz
/usr/games/fortune >> /tmp/zz
/home/mailman/bin/withlist -l -r xmf x-[mylistname]

rm -f /tmp/zz




Hope it helps.


Ciao,
luigi



--
+----[Luigi Rosa]-
+--[lrosa at venus.it]--[lrosa at fantascienza.com]-
+--[Integrated Networking Solutions S.a.s. - Milan - Italy]-
+
+--[Non Multa, Sed Multum]-







More information about the Mailman-Users mailing list