[Mailman-Users] accessing relay mailman server from itsown network

Mark Sapiro mark at msapiro.net
Fri Apr 12 01:02:31 CEST 2013


Anne Wainwright wrote:
>
>Actually there were 5 'absolute=1' entries in admindb.py and changing
>them all has resolved the issue of pending moderator request, but the
>list archives remains absolute.


Current Mailman has only 4. The change between 2.1.14 and 2.1.15 to add
the logout button inserted this one

        # Now print the results and we're done.  Short circuit for when
there
        # are no pending requests, but be sure to save the results!
        admindburl = mlist.GetScriptURL('admindb', absolute=1)
        if not mlist.NumRequestsPending():

and removed these two

            doc.AddItem(_('There are no pending requests.'))
            doc.AddItem(' ')
            doc.AddItem(Link(mlist.GetScriptURL('admindb', absolute=1),
                             _('Click here to reload this page.')))
            doc.AddItem(mlist.GetMailmanFooter())
            print doc.Format()
            mlist.Save()
            return

        admindburl = mlist.GetScriptURL('admindb', absolute=1)
        form = Form(admindburl)
        # Add the instructions template

In any case, you want to remove ', absolute=1' from the two or its one
replacement.

That leaves these three:

in main()

        # Add a link back to the overview, if we're not viewing the
overview!
        adminurl = mlist.GetScriptURL('admin', absolute=1)

in handle_no_list()

    url = Utils.ScriptURL('admin', absolute=1)
    link = Link(url, _('list of available mailing lists.')).Format()
    doc.AddItem(_('You must specify a list name.  Here is the
%(link)s'))

and in show_helds_overview)_

    # Add the by-sender overview tables
    admindburl = mlist.GetScriptURL('admindb', absolute=1)

The last of these should definitely be changed. The other two are
actually links back to the admin (not admindb) overview page. The one
in main() is a link to the admin overview for the host of the list
that we're currently processing in the admindb page, but the one in
handle_no_list() is different because there is no list. Depending of
site configuration, the host in this URL if absolute may be the web
host of the current page, or it may be DEFAULT_URL_HOST. This could
cause problems with a relative URL if the absolute one should go to
DEFAULT_URL_HOST.

So I would say in your case, you can probably safely remove them all,
but in terms of what I might do for a bug and fix, I may not do the
one in handle_no_list().

As far as the archive URL is concerned, this is generated differently
as it has to take into account whether the archives are public or
private and the setting for PUBLIC_ARCHIVE_URL and it's always
absolute.

-- 
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