summaryrefslogtreecommitdiff
path: root/src/mailman/docs/domains.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/docs/domains.txt')
-rw-r--r--src/mailman/docs/domains.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/mailman/docs/domains.txt b/src/mailman/docs/domains.txt
new file mode 100644
index 000000000..b71689520
--- /dev/null
+++ b/src/mailman/docs/domains.txt
@@ -0,0 +1,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')