blob: b7168952036d3d9f71284fb32341a1f543aef559 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
Domains
=======
Domains are how Mailman interacts with email host names and web host names.
Generally, new domains are registered in the mailman.cfg configuration file.
We simulate that here by pushing new configurations.
>>> config.push('example.org', """
... [domain.example_dot_org]
... email_host: example.org
... base_url: https://mail.example.org
... description: The example domain
... contact_address: postmaster@mail.example.org
... """)
>>> domain = config.domains['example.org']
>>> print domain.email_host
example.org
>>> print domain.base_url
https://mail.example.org
>>> print domain.description
The example domain
>>> print domain.contact_address
postmaster@mail.example.org
>>> print domain.url_host
mail.example.org
Confirmation tokens
-------------------
Confirmation tokens can be added to either the email confirmation address...
>>> print domain.confirm_address('xyz')
confirm-xyz@example.org
...or the confirmation url.
>>> print domain.confirm_url('abc')
https://mail.example.org/confirm/abc
Clean up
--------
>>> config.pop('example.org')
|