Hiding an ML from a site
I host two MLs on the same server/same MM3 instance. Under the Django Admin interface, I created two sites. I expected that each ML will belong to its own site and should not be visible on another site. On https://mm3-lists.kictanet.or.ke/mm/lists/, you can see the two lists. How do I stop the "Users" list from showing up on this site ( https://mm3-lists.kictanet.or.ke/mm/lists/) since it belongs to its own site - https://exim4u.org/mm/lists/ ?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
On 2024-02-06 21:34, Odhiambo Washington wrote:
I host two MLs on the same server/same MM3 instance. Under the Django Admin interface, I created two sites. I expected that each ML will belong to its own site and should not be visible on another site. On https://mm3-lists.kictanet.or.ke/mm/lists/, you can see the two lists. How do I stop the "Users" list from showing up on this site ( https://mm3-lists.kictanet.or.ke/mm/lists/) since it belongs to its own site - https://exim4u.org/mm/lists/ ?
In your settings file, add the line: FILTER_VHOST = True
# Mailman Web configuration file. # /etc/mailman3/settings.py ... #Filter visible Mailing Lists based on the current host being used to serve. FILTER_VHOST = True
On Tue, Feb 6, 2024 at 2:22 PM Mark <imark@posteo.net> wrote:
On 2024-02-06 21:34, Odhiambo Washington wrote:
I host two MLs on the same server/same MM3 instance. Under the Django Admin interface, I created two sites. I expected that each ML will belong to its own site and should not be visible on another site. On https://mm3-lists.kictanet.or.ke/mm/lists/, you can see the two lists. How do I stop the "Users" list from showing up on this site ( https://mm3-lists.kictanet.or.ke/mm/lists/) since it belongs to its own site - https://exim4u.org/mm/lists/ ?
In your settings file, add the line: FILTER_VHOST = True
# Mailman Web configuration file. # /etc/mailman3/settings.py ... #Filter visible Mailing Lists based on the current host being used to serve. FILTER_VHOST = True
I had this set to True in settings_local.py, but False in settings.py. So it seems to not make a difference in my setup.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
On February 6, 2024 7:45:14 AM PST, Odhiambo Washington <odhiambo@gmail.com> wrote:
I had this set to True in settings_local.py, but False in settings.py. So it seems to not make a difference in my setup.
In a standard setup, anything set in settings_local.py overrides any corresponding setting in settings.py.
That said, FILTER_VHOSTS is not perfect. It only works for Postorius if the separate web hosts also have different mail hosts. See lines 1051 et seq at <https://gitlab.com/mailman/postorius/-/blob/master/src/postorius/views/list....>
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Wed, Feb 7, 2024 at 9:45 PM Mark Sapiro <mark@msapiro.net> wrote:
On February 6, 2024 7:45:14 AM PST, Odhiambo Washington <odhiambo@gmail.com> wrote:
I had this set to True in settings_local.py, but False in settings.py. So it seems to not make a difference in my setup.
In a standard setup, anything set in settings_local.py overrides any corresponding setting in settings.py.
That said, FILTER_VHOSTS is not perfect. It only works for Postorius if the separate web hosts also have different mail hosts. See lines 1051 et seq at < https://gitlab.com/mailman/postorius/-/blob/master/src/postorius/views/list....
What should I do then? Edit some file? Apply some patch? It's pretty easy for me to create a DNS record for the same server (IP) for use with the web host that I'd like to hide.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
On February 7, 2024 1:34:32 PM PST, Odhiambo Washington <odhiambo@gmail.com> wrote:
What should I do then? Edit some file? Apply some patch? It's pretty easy for me to create a DNS record for the same server (IP) for use with the web host that I'd like to hide.
In the Domains view in postorius, you need separate mail hosts. Then you need to change the domain of one of the lists to the 'new' mail host. This implies changing its address which may not be acceptable.
Or, you can just live with it as is.
Note, I have been without power at my house for almost 3 days now, so I don't have access to all my usual resources.
-- Mark Sapiro <mark@msapiro.net> Sent from my Not_an_iThing with standards compliant, open source software.
On Thu, Feb 8, 2024 at 1:21 AM Mark Sapiro <mark@msapiro.net> wrote:
On February 7, 2024 1:34:32 PM PST, Odhiambo Washington < odhiambo@gmail.com> wrote:
What should I do then? Edit some file? Apply some patch? It's pretty easy for me to create a DNS record for the same server (IP) for use with the web host that I'd like to hide.
In the Domains view in postorius, you need separate mail hosts. Then you need to change the domain of one of the lists to the 'new' mail host. This implies changing its address which may not be acceptable.
Looking at Postorius, they do have different mail hosts. See the screenshot at: https://imgur.com/a/GsiiEjP
Or, you can just live with it as is.
The problem with this is that those who go to the site have been trying to subscribe to the other ML.
Note, I have been without power at my house for almost 3 days now, so I
don't have access to all my usual resources.
In Kenya, the blackouts can last equally long at times - and there is nothing we can do about it because the power distributor is a monopoly. Sorry for all the loss you've incurred from the foods getting spoilt in the fridge :-(
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
On 2024-02-08 10:43:37 +0300 (+0300), Odhiambo Washington wrote: [...]
Looking at Postorius, they do have different mail hosts. [...]
Are you using the magic SITE_ID=0 in your settings file? For our deployments, that was necessary to get it to auto-detect which filter to apply based on the domain name used by the browser.
Jeremy Stanley
On Thu, Feb 8, 2024 at 4:57 PM Jeremy Stanley <fungi@yuggoth.org> wrote:
On 2024-02-08 10:43:37 +0300 (+0300), Odhiambo Washington wrote: [...]
Looking at Postorius, they do have different mail hosts. [...]
Are you using the magic SITE_ID=0 in your settings file? For our deployments, that was necessary to get it to auto-detect which filter to apply based on the domain name used by the browser.
Jeremy Stanley
Yes, I do have that in settings_local.py
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
On February 7, 2024 11:43:37 PM PST, Odhiambo Washington <odhiambo@gmail.com> wrote:
Looking at Postorius, they do have different mail hosts. See the screenshot at: https://imgur.com/a/GsiiEjP
That looks as it should. I don't know why FILTER_VHOSTS isn't working.
-- Mark Sapiro <mark@msapiro.net> Sent from my Not_an_iThing with standards compliant, open source software.
participants (5)
-
Jeremy Stanley
-
Mark
-
Mark Sapiro
-
Odhiambo Washington
-
Stephen J. Turnbull