Django site - how to create programmatically - new install
Hi all,
I've mainly setup mailman3 to replace our mailman 2.1 install using Ansible, a point I could do with some assistance on is setting the fqdn used programmatically. I've been doing alot of reading before creating this thread.
To create a domain I currently navigate to: https://serverfqdn.com/postorius/domains/ and click 'Add Domain'.
I believe this is setting the name of the Django site, please accept my apologies if I'm wrong and the SITE_ID=1 is then used, I am only planning to use one domain only. I'm using Postgres and when I check the contents of the Django_mailman3_maildomain table as below afterwards:
mailman3web=# TABLE django_mailman3_maildomain; id | mail_domain | site_id ----+--------------------------------------+--------- 1 | mailman3-test2.guest.codethink.co.uk | 1
Many thanks
Daniel
On Fri, Sep 30, 2022, at 10:12 AM, daniel.botting@codethink.co.uk wrote:
Hi all,
I've mainly setup mailman3 to replace our mailman 2.1 install using Ansible, a point I could do with some assistance on is setting the fqdn used programmatically. I've been doing alot of reading before creating this thread.
To create a domain I currently navigate to: https://serverfqdn.com/postorius/domains/ and click 'Add Domain'.
I believe this is setting the name of the Django site, please accept my apologies if I'm wrong and the SITE_ID=1 is then used, I am only planning to use one domain only. I'm using Postgres and when I check the contents of the Django_mailman3_maildomain table as below afterwards:
mailman3web=# TABLE django_mailman3_maildomain; id | mail_domain | site_id ----+--------------------------------------+--------- 1 | mailman3-test2.guest.codethink.co.uk | 1
Many thanks
You can create domains via the REST API: https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/d...
The documentation shows the use of helper functions, but you should be able to interact with the API using any HTTP client. We're doing this with Ansible and it looks like: https://paste.opendev.org/show/byAG1wqXVHgKVsJ28Eb9/
Daniel
Hi Clark,
Thanks for your prompt reply and Ansible example, that is very kind of you.
Many thanks
Daniel
participants (2)
-
Clark Boylan
-
daniel.botting@codethink.co.uk