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]-
+--[[EMAIL PROTECTED]]--[[EMAIL PROTECTED]]-
+--[Integrated Networking Solutions S.a.s. - Milan - Italy]-
+
+--[Non Multa, Sed Multum]-




------------------------------------------------------
Mailman-Users maillist  -  [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users

Reply via email to