FILTER_VHOST = True doesn't work fine with alias_domain
Hello,
My mailman3 installation is now functional, but the config "FILTER_VHOST = True" doesn't work fine when I define "alias_domain" for the 2 domains. I need to define that because I need to get "postfix_vmap" file.
As you can see, list from others domains are visible on this URL : https://ml.franceserv.fr/postorius/lists/
I would like https://ml.franceserv.fr/postorius/lists/ and https://ml.viticreation.fr/postorius/lists/ with their own lists.
Where I should check please to solve this ?
Thank you in advance.
On 2/17/22 15:15, Élodie BOSSIER via Mailman-users wrote:
Hello,
My mailman3 installation is now functional, but the config "FILTER_VHOST = True" doesn't work fine when I define "alias_domain" for the 2 domains. I need to define that because I need to get "postfix_vmap" file.
As you can see, list from others domains are visible on this URL : https://ml.franceserv.fr/postorius/lists/
I would like https://ml.franceserv.fr/postorius/lists/ and https://ml.viticreation.fr/postorius/lists/ with their own lists.
There are issues with FILTER_VHOST due to the fact that mailing lists do not have a web host attribute. This means when you go to HyperKitty or Postorius when FILTER_VHOST is True, we look up the domain record for the web host you are visiting and show you all the lists whose mail host matches the mail host for the web host domain. This has nothing to do with alias domains.
What that means is if all your domains records have a unique mail host, FILTER_VHOST will work as you expect, but if multiple domains have the same mail host FILTER_VHOST will show you the lists for the current web host plus all those with a matching mail host.
I.e. if in your case, the ml.franceserv.fr domain and the ml.viticreation.fr domain have the same mail host, FILTER_VHOST won't separate them. If they have different mail hosts FILTER_VHOST will separate them.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thank you for your response Mark,
With Mailman 2.1, the lists were split on their webpage respectively. How could I do same with Mailman 3.3.3 (Tom Sawyer) please ?
My domain table SQL have this result : id, mail_host, description, alias_domain 1, ml.franceserv.fr, NULL, local.ml.franceserv.fr 2, ml.viticreation.fr, NULL, local.ml.viticreation.fr
mailinglist table SQL : id, list_name, mail_host, list_id, ... 1, bar, ml.franceserv.fr, bar.ml.franceserv.fr, ... 2, viticreation, ml.viticreation.fr, viticreation.ml.viticreation.fr, ...
Can I do something ? A patch somewhere ? Shall I wait issues are solved and how long approximatively please ? Which don't reassure me is I can see old discussions about FILTER_VHOST there are 2 years.
I can retrieve my own old question there are 2 years when I tried to migrate from Mailman 2 to Mailman 3 : https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/7... and in 2020 you told me it was working for you at this date. It's don't reassure me to retrieve a problem I got there are 2 years.
I could set in production my Mailman 3 but the problem is my customers won't understand why they can see the lists of others domains name ... and not sure about the security ...
Thank you again.
Le 18/02/2022 à 00:33, Mark Sapiro a écrit :
There are issues with FILTER_VHOST due to the fact that mailing lists do not have a web host attribute. This means when you go to HyperKitty or Postorius when FILTER_VHOST is True, we look up the domain record for the web host you are visiting and show you all the lists whose mail host matches the mail host for the web host domain. This has nothing to do with alias domains.
What that means is if all your domains records have a unique mail host, FILTER_VHOST will work as you expect, but if multiple domains have the same mail host FILTER_VHOST will show you the lists for the current web host plus all those with a matching mail host.
I.e. if in your case, the ml.franceserv.fr domain and the ml.viticreation.fr domain have the same mail host, FILTER_VHOST won't separate them. If they have different mail hosts FILTER_VHOST will separate them.
On 2/18/22 01:55, Élodie BOSSIER via Mailman-users wrote:
Thank you for your response Mark,
With Mailman 2.1, the lists were split on their webpage respectively. How could I do same with Mailman 3.3.3 (Tom Sawyer) please ?
My domain table SQL have this result : id, mail_host, description, alias_domain 1, ml.franceserv.fr, NULL, local.ml.franceserv.fr 2, ml.viticreation.fr, NULL, local.ml.viticreation.fr
If you go to https://example.com/mailman3/domains/ (the Domains view in Postorius) you will see at least two entries, one with Mail Host ml.franceserv.fr and one with Mail Host ml.viticreation.fr.
What are the Web Host entries for these?
You should have two separate site entries in the django_site table (https://example.com/admin/sites/site/) for these domains.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Le 18/02/2022 à 18:23, Mark Sapiro a écrit :
If you go to https://example.com/mailman3/domains/ (the Domains view in Postorius) you will see at least two entries, one with Mail Host ml.franceserv.fr and one with Mail Host ml.viticreation.fr.
What are the Web Host entries for these? You should have two separate site entries in the django_site table (https://example.com/admin/sites/site/) for these domains.
Ah alright, now I understand how to proceed and it's working perfectly. I need to add domains through https://ml.franceserv.fr/admin/sites/site/ and define a new site_id for each domain name. Thank you very much for your help.
This is my result : https://images.franceserv.fr/images/2022/02/18/06d4eb84a0ded88d55c0296ff0c3d...
Now, I need to find how to set it automatic when I will add a new list. Perhaps I could do it with an an SQL command if there are no bash command ? I will check with "mailman create" and the --domain argument.
Thank you again for your help.
On 2/18/22 09:53, Élodie BOSSIER via Mailman-users wrote:
Now, I need to find how to set it automatic when I will add a new list. Perhaps I could do it with an an SQL command if there are no bash command ? I will check with "mailman create" and the --domain argument.
Part of adding a new list is specifying the domain. If it's one of the
existing domains, i.e., ml.franceserv.fr, or ml.viticreation.fr, that's
all that needs to be done. e.g. mailman create newlist@ml.franceserv.fr
.
If it's a new domain, you need to add the domain to the django_site
table perhaps directly or via the django admin UI and then after
mailman create newlist@new.domain
you may need to edit the domain via
Postorius' domains view to specify the correct Web Host.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Élodie BOSSIER