[Mailman-Users] control delivery processes

Mark Sapiro mark at msapiro.net
Tue Mar 4 02:14:55 CET 2014

On 03/03/2014 04:46 PM, DongInn Kim wrote:
> Can anyone please help me to debug the syntax error in mm_cfg.py?
> ompi_list = [ 'test-crest', 'osl-test' ]
> if listname in ompi_list:
>     archive_url = ("http://www.open-mpi.org/community/lists/devel/%s/date.php" % (time.strftime("%Y/%m")))
>     DEFAULT_MSG_FOOTER = """_______________________________________________
> %(real_name)s mailing list
> %(real_name)s@%(host_name)s
> subscribe: %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
> searchable archives: %(archive_url)s
> """  % { 'archive_url' : archive_url }
> What I wanted here is to apply the new DEFAULT_MSG_FOOTER only for the specific mailing lists.
> Is there something wrong here? 

There are several thinks wrong. At the time mm_cfg.py is imported, the
name listname is not defined. This is your syntax error, but beyond
that, you have a huge misunderstanding of how to go about what you are
trying to do.

DEFAULT_MSG_FOOTER only establishes the default value for a newly
created list. What you want is to set the msg_footer attribute for the
'test-crest' and 'osl-test' lists to something like:

%(real_name)s mailing list
subscribe: %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
searchable archives:

And then modify Mailman/Handlers/Decorate.py to import time and augment
the replacement dictionary by adding {'time': time.strftime("%Y/%m")}.

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

More information about the Mailman-Users mailing list