Strange link disparity
Hi,
When I enter the admin page of my list, all links point to HTTPS://my.dom.ain, except the one that points to the list archives which points to HTTP. How is this possible? I have been barking at all trees for the last couple of days to find what the problem is.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)
Odhiambo Washington writes:
When I enter the admin page of my list, all links point to HTTPS://my.dom.ain, except the one that points to the list archives which points to HTTP. How is this possible?
It's *possible* because list archives are frequently hosted at a different URL, so the base URLs for archive URLs have a separate variable from the base for Mailman admin (including user configuration) pages.
There are several ways they might have become different in your case so I'm not going to try to enumerate them, but check in mm_cfg.py:
# The url template for the public archives. This will be used in several # places, including the List-Archive: header, links to the archive on the # list's listinfo page, and on the list's admin page. # # This should be a string with "%(listname)s" somewhere in it. Mailman will # interpolate the name of the list into this. You can also include a # "%(hostname)s" in the string, into which Mailman will interpolate # the host name (usually DEFAULT_URL_HOST). PUBLIC_ARCHIVE_URL = 'http://%(hostname)s/pipermail/%(listname)s/'
and compare with:
# Mailman needs to know about (at least) two fully-qualified domain names # (fqdn); 1) the hostname used in your urls, and 2) the hostname used in email # addresses for your domain. For example, if people visit your Mailman system # with "http://www.dom.ain/mailman" then your url fqdn is "www.dom.ain", and # if people send mail to your system via "yourlist@dom.ain" then your email # fqdn is "dom.ain". DEFAULT_URL_HOST controls the former, and # DEFAULT_EMAIL_HOST controls the latter. Mailman also needs to know how to # map from one to the other (this is especially important if you're running # with virtual domains). You use "add_virtualhost(urlfqdn, emailfqdn)" to add # new mappings. # # If you don't need to change DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST in your # mm_cfg.py, then you're done; the default mapping is added automatically. If # however you change either variable in your mm_cfg.py, then be sure to also # include the following: # # add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) # # because otherwise the default mappings won't be correct. DEFAULT_EMAIL_HOST = 'localhost' DEFAULT_URL_HOST = 'localhost' DEFAULT_URL_PATTERN = 'http://%s/cgi-bin/mailman/'
# DEFAULT_HOST_NAME has been replaced with DEFAULT_EMAIL_HOST, however some # sites may have the former in their mm_cfg.py files. If so, we'll believe # that, otherwise we'll believe DEFAULT_EMAIL_HOST. Same for DEFAULT_URL. DEFAULT_HOST_NAME = None DEFAULT_URL = None
I've included the docs from Defaults.py. Note that PUBLIC_ARCHIVE_URL is separated from the other URLs by a lot of text in Defaults.py. Of course they can be in any order in mm_cfg.py. As you can see from the defaults the URLs for all of these variables default to the http scheme. I suspect that when you (re)configured your lists for HTTPS, you didn't fixup PUBLIC_ARCHIVE_URL, and it seemed to Just Work (except for the URL scheme) because you have a single-domain setup.
Let me know if that wasn't it.
Steve
On Sat, 5 Sep 2020 at 14:05, Stephen J. Turnbull < turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Odhiambo Washington writes:
When I enter the admin page of my list, all links point to HTTPS://my.dom.ain, except the one that points to the list archives which points to HTTP. How is this possible?
It's *possible* because list archives are frequently hosted at a different URL, so the base URLs for archive URLs have a separate variable from the base for Mailman admin (including user configuration) pages.
There are several ways they might have become different in your case so I'm not going to try to enumerate them, but check in mm_cfg.py:
# The url template for the public archives. This will be used in several # places, including the List-Archive: header, links to the archive on the # list's listinfo page, and on the list's admin page. # # This should be a string with "%(listname)s" somewhere in it. Mailman will # interpolate the name of the list into this. You can also include a # "%(hostname)s" in the string, into which Mailman will interpolate # the host name (usually DEFAULT_URL_HOST). PUBLIC_ARCHIVE_URL = 'http://%(hostname)s/pipermail/%(listname)s/'
and compare with:
# Mailman needs to know about (at least) two fully-qualified domain names # (fqdn); 1) the hostname used in your urls, and 2) the hostname used in email # addresses for your domain. For example, if people visit your Mailman system # with "http://www.dom.ain/mailman" then your url fqdn is "www.dom.ain", and # if people send mail to your system via "yourlist@dom.ain" then your email # fqdn is "dom.ain". DEFAULT_URL_HOST controls the former, and # DEFAULT_EMAIL_HOST controls the latter. Mailman also needs to know how to # map from one to the other (this is especially important if you're running # with virtual domains). You use "add_virtualhost(urlfqdn, emailfqdn)" to add # new mappings. # # If you don't need to change DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST in your # mm_cfg.py, then you're done; the default mapping is added automatically. If # however you change either variable in your mm_cfg.py, then be sure to also # include the following: # # add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) # # because otherwise the default mappings won't be correct. DEFAULT_EMAIL_HOST = 'localhost' DEFAULT_URL_HOST = 'localhost' DEFAULT_URL_PATTERN = 'http://%s/cgi-bin/mailman/'
# DEFAULT_HOST_NAME has been replaced with DEFAULT_EMAIL_HOST, however some # sites may have the former in their mm_cfg.py files. If so, we'll believe # that, otherwise we'll believe DEFAULT_EMAIL_HOST. Same for DEFAULT_URL. DEFAULT_HOST_NAME = None DEFAULT_URL = None
I've included the docs from Defaults.py. Note that PUBLIC_ARCHIVE_URL is separated from the other URLs by a lot of text in Defaults.py. Of course they can be in any order in mm_cfg.py. As you can see from the defaults the URLs for all of these variables default to the http scheme. I suspect that when you (re)configured your lists for HTTPS, you didn't fixup PUBLIC_ARCHIVE_URL, and it seemed to Just Work (except for the URL scheme) because you have a single-domain setup.
Let me know if that wasn't it.
Your suspicions were right. I hadn't specified the PUBLIC_ARCHIVE_URL in my mm_cfg.py. I have now done that and my problem is solved. I also did fixup my DEFAULT_URL_PATTERN to https.
Thank you very much.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)
Odhiambo Washington writes:
Your suspicions were right. I hadn't specified the PUBLIC_ARCHIVE_URL in my mm_cfg.py. I have now done that and my problem is solved. I also did fixup my DEFAULT_URL_PATTERN to https.
Ah, so you also remembered to run fix_url! *applause* Seriously, that's a weakness of the way Mailman 2 handles those things as static configurations.
For all you "we should maintain and improve Mailman 2" folks: maybe fix_url should warn on mixtures of http and https.
On Sun, 6 Sep 2020 at 17:02, Stephen J. Turnbull < turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Odhiambo Washington writes:
Your suspicions were right. I hadn't specified the PUBLIC_ARCHIVE_URL in my mm_cfg.py. I have now done that and my problem is solved. I also did fixup my DEFAULT_URL_PATTERN to https.
Ah, so you also remembered to run fix_url! *applause* Seriously, that's a weakness of the way Mailman 2 handles those things as static configurations.
In my case, fix_url wasn't necessary because I had run it before.
For all you "we should maintain and improve Mailman 2" folks: maybe fix_url should warn on mixtures of http and https.
:-)
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)
participants (2)
-
Odhiambo Washington
-
Stephen J. Turnbull