[Mailman-Users] Mailman Templates

Mark Sapiro msapiro at value.net
Mon Aug 27 18:19:42 CEST 2007


Matt Zimmerman" <matt.l.zimmerman at gmail.com>
   Date: Mon, 27 Aug 2007 10:36:33 -0400
     To: Mailman-Users at python.org

>Mailman-users,
>
>I am using Mailman 2.18 on Solaris 10. The issue that I am having is that I
>need to add a prefix in front of the certain %(url)s


To you need to change only some URLs or can you change all?  The proper
way to change all urls is to change DEFAULT_URL_PATTERN in mm_cfg.py
and then run fix_url on all lists. See
<http://www.python.org/cgi-bin/faqw-mm.py?query=default_url_pattern&querytype=simple&casefold=yes&req=search>.


>so that it will reflect
>our vpn. I can change a few but when I try to change the %(confirmurl)s to:
>
>(/usr/local/mailman/templates/en)
>vi postheld.txt
>
> hostname.com/mailman/confirm/%(listname)s/%(cookie)s The email looks like
>this
>
>hostname.com/mailman/confirm/fake_list/%(cookie)s


First, never edit files in /usr/local/mailman/templates/en. See
<http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.048.htp>
for the way to create edited versions of templates to apply sitewide
or to a particular domain or list.

Your change doesn't work because the replacement dictionary for this
template contains an entry for 'confirmurl', but it doesn't contain an
entry for 'cookie'.


>Is there anyway I can fix this? If you need me to go into more detail please
>let me know.

> <https://igc.infragard.org/http/listserv.infragard.org:8080/mailman/confirm/Test/%%28cookie%29s>

Fix it by putting something like

DEFAULT_URL_PATTERN = 'https://igc.infragard.org/http/%s:8080/mailman/'

in mm_cfg.py and running fix_url on the lists.

If you can't do that, you'll have to modify code, in this case by
adding something like

        d['cookie'] = cookie

to the appropriate place in the hold_for_approval function in
Mailman/Handlers/Hold.py.

-- 
Mark Sapiro <msapiro at value.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