Differences in URL hostname computed for private and public archives

I am referring to Mailman 2.1.2 in what follows.
When computing an absolute URL pointing at a list's archives, the computation of the hostname in the URL is performed differently depending on whether the list archives are private or public.
I cannot spot an obvious reason for why this should be so. I am hoping some kind reader will enlighten me.
My analysis, in summary:
The same function GetBaseArchiveURL() in $prefix/Mailman/Archive/Archiver.py is called to deliver the list's archive URL for both public and private list archives.
Private list archives call subsidiary functions which leads to the FQDN extracted from the list's web_page_url attribute being used to form the required URL.
Public list archives use the list's host_name attribute and use that perform lookup in an inversion of the mm.cfg.VIRTUAL_HOSTS dictionary to obtain a URL_FQDN to form the required URL. If the lookup fails then the DEFAULT_URL_HOST is used.
Why the difference in approach?
A consequence of this approach is that if several different virtual hosts use the same EMAIL_FQDN, which means the VIRTUAL_HOSTS dictionary is a many-one mapping for those virtual hosts' URL_FQDNs, their public list archive base URLs are arbitrarily assigned to just one of those URL_FQDNs.
This method of computing the URL pointing at a list's archives also seems to interact negatively with a weak aspect of the cPanel (http://http://cpanel.net/) implementation of MM 2.1.2
cPanel does not appear to maintain (my guess because I do not have access to the source code of their MM related stuff) the mm_cfg.VIRTUAL_HOSTS dictionary and seems to setup the web_page_url and host_name attributes of list created via cPanel without reference to VIRTUAL_HOSTS dictionary. But, as a consequence, when list archives are public the URLs of links to them on the /mailman/listinfo/<listname> and /mailman/admin/<listname> pages use the hosting server's hostname rather than the hosted domain name.
While it seems that the CPanel implementation of Mailman is partially broken, the URLs generated for MM's CGI prgarams happen to work OK because they are formed from the web_page_url list attribute.
Richard Barrett http://www.openinfo.co.uk

Hi,
I have just uploaded a patch for this issue. http://sourceforge.net/tracker/index.php?func=detail&aid=789015&group_id=103&atid=300103
Richard Barrett wrote:
I am referring to Mailman 2.1.2 in what follows.
When computing an absolute URL pointing at a list's archives, the computation of the hostname in the URL is performed differently depending on whether the list archives are private or public.
I cannot spot an obvious reason for why this should be so. I am hoping some kind reader will enlighten me.
My analysis, in summary:
The same function GetBaseArchiveURL() in $prefix/Mailman/Archive/Archiver.py is called to deliver the list's archive URL for both public and private list archives.
Private list archives call subsidiary functions which leads to the FQDN extracted from the list's web_page_url attribute being used to form the required URL.
Public list archives use the list's host_name attribute and use that perform lookup in an inversion of the mm.cfg.VIRTUAL_HOSTS dictionary to obtain a URL_FQDN to form the required URL. If the lookup fails then the DEFAULT_URL_HOST is used.
Why the difference in approach?
A consequence of this approach is that if several different virtual hosts use the same EMAIL_FQDN, which means the VIRTUAL_HOSTS dictionary is a many-one mapping for those virtual hosts' URL_FQDNs, their public list archive base URLs are arbitrarily assigned to just one of those URL_FQDNs.
This method of computing the URL pointing at a list's archives also seems to interact negatively with a weak aspect of the cPanel (http://http://cpanel.net/) implementation of MM 2.1.2
cPanel does not appear to maintain (my guess because I do not have access to the source code of their MM related stuff) the mm_cfg.VIRTUAL_HOSTS dictionary and seems to setup the web_page_url and host_name attributes of list created via cPanel without reference to VIRTUAL_HOSTS dictionary. But, as a consequence, when list archives are public the URLs of links to them on the /mailman/listinfo/<listname> and /mailman/admin/<listname> pages use the hosting server's hostname rather than the hosted domain name.
While it seems that the CPanel implementation of Mailman is partially broken, the URLs generated for MM's CGI prgarams happen to work OK because they are formed from the web_page_url list attribute.
Richard Barrett http://www.openinfo.co.uk
Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers
-- Tokio Kikuchi, tkikuchi@ is.kochi-u.ac.jp http://weather.is.kochi-u.ac.jp/
participants (2)
-
Richard Barrett
-
Tokio Kikuchi