On Fri, Sep 1, 2017, at 08:51 AM, C. R. Oldham wrote:
I had a question regarding the parameter: SERVE_FROM_DOMAIN.
I want to use multiple domains, what is the best way to specify multiple domains in this environment variable?
This works OK for me:
SERVE_FROM_DOMAIN=lists.domain1.org,lists.domain2.net,lists.domain3.com
I never thought this would work, I would correspond to an invalid entry in ALLOWED_HOSTS in Django configuration.
The best way would be to put the domain you are going to serve from in
the
SERVE_FROM_DOMAIN variable as this would replace the example.com
SITE
that Django creates by default.
And then, you can list all your domains in /opt/mailman/web/settings_local.py in a Python list:
ALLOWED_HOSTS = ["domain1", "domain2", "domain3"]
Note that you need to also include the domain you set in SERVE_FROM_DOMAIN here.
I also had to login to the Django admin interface and create the domains there under Home->Sites
And yes, for Django to allow domains, you need to create a 'Site' in the admin console. The default one is created automatically using SERVE_FROM_DOMAIN variable.
--cro
Mailman-users mailing list mailman-users@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj