[Mailman-Users] Adding disclaimer to message footer via command line

Leon Kolchinsky leonk at construct.haifa.ac.il
Mon Jan 22 10:43:28 CET 2007



> -----Original Message-----
> From: Mark Sapiro [mailto:msapiro at value.net]
> Sent: Sunday, January 21, 2007 6:35 PM
> To: Leon Kolchinsky; mailman-users at python.org
> Subject: Re: [Mailman-Users] Adding disclaimer to message footer via
> command line
> 
> Leon Kolchinsky wrote:
> >
> >Our management decided to add disclaimer to every footer in Digest and
> >Non-digest options.
> >I know that this is a bad netiquette but I have no choice.
> >
> >I have a lot of mailinglists running on my server and I though that may
> be
> >there is a way to do this addition with some script via command line and
> add
> >this to all lists, and save from myself doing it via web-interface
> enormous
> >times.
> 
> 
> You can do this fairly easily in two ways. One is with a bin/withlist
> script and the other is by running bin/config_list via a shell script.
> 
> Several examples of withlist scripts (not this exact one) can be found
> at <http://veenet.value.net/~msapiro/scripts/> or
> <http://fog.ccsf.edu/~msapiro/scripts/>.
> 
> The shell script method is described at
> <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.038.htp>.
> 
> With the shell method, the input to config_list (configfile in the FAQ)
> would contain
> 
> 
> msg_footer="""First line of footer
> Second line
> ...
> Last line
> """
> digest_footer="""First line of footer
> Second line
> ...
> Last line
> """
> 
> You also want the set DEFAULT_MSG_FOOTER in mm_cfg.py (if you haven't
> changed DEFAULT_DIGEST_FOOTER, you don't need to now as it defaults to
> DEFAULT_MSG_FOOTER) so the footer is set for new lists.
> 


Thank you Mark,

I've created footer.txt file with the following text:

msg_footer = """_______________________________________________
%(real_name)s mailing list
%(real_name)s@%(host_name)s
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Here comes a disclaimer text"""

digest_footer = """_______________________________________________
%(real_name)s mailing list
%(real_name)s@%(host_name)s
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Here comes a disclaimer text"""

And run this script:
for i in $(/usr/lib/mailman/bin/list_lists -b) ; do
/usr/lib/mailman/bin/config_list -i /path_to/footer.txt $i ; done

I've also added the following to /usr/lib/mailman/Mailman/mm_cfg.py, so all
new created lists will get this disclaimer automatically:

DEFAULT_MSG_FOOTER = """_______________________________________________
%(real_name)s mailing list
%(real_name)s@%(host_name)s
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Here comes a disclaimer text"""


> --
> Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
> San Francisco Bay Area, California    better use your sense - B. Dylan


Best Regards,
Leon Kolchinsky




More information about the Mailman-Users mailing list