Hey Mark, I'm looking at the documentation here:
https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/model/docs/domains.html#domains

Which seems to indicate that adding a domain via the CLI is as easy as:

from mailman.interfaces.domain import IDomainManager
from zope.component import getUtility
manager = getUtility(IDomainManager)
manager.add('example.org')

It's not until much further down the page that there's any reference to 
"committing" a change. But sure enough when I add the following three lines to 
the previous 4, I'm able to create a mailing list with staging.mydomain.dev 
using the REST API.

from mailman.config import config
transaction = config.db
transaction.commit()

I created an issue suggesting as much on GitLab:
https://gitlab.com/mailman/mailman/-/issues/1178

Thank you for pointing me in the right direction.
_______________________________________________
Mailman-users mailing list -- mailman-users@mailman3.org
To unsubscribe send an email to mailman-users-le...@mailman3.org
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at: 
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/PYBMUNXWZHLXBY3PXM7MZFQ6FZNDVG5K/

This message sent to arch...@mail-archive.com

Reply via email to