diff options
Diffstat (limited to 'src/mailman/model/docs/domains.rst')
| -rw-r--r-- | src/mailman/model/docs/domains.rst | 42 |
1 files changed, 13 insertions, 29 deletions
diff --git a/src/mailman/model/docs/domains.rst b/src/mailman/model/docs/domains.rst index c0d65cee7..dc117a98e 100644 --- a/src/mailman/model/docs/domains.rst +++ b/src/mailman/model/docs/domains.rst @@ -32,24 +32,24 @@ Adding a domain requires some basic information, of which the email host name is the only required piece. The other parts are inferred from that. >>> manager.add('example.org') - <Domain example.org, base_url: http://example.org> + <Domain example.org> >>> show_domains() - <Domain example.org, base_url: http://example.org> + <Domain example.org> We can remove domains too. >>> manager.remove('example.org') - <Domain example.org, base_url: http://example.org> + <Domain example.org> >>> show_domains() no domains Sometimes the email host name is different than the base url for hitting the web interface for the domain. - >>> manager.add('example.com', base_url='https://mail.example.com') - <Domain example.com, base_url: https://mail.example.com> + >>> manager.add('example.com') + <Domain example.com> >>> show_domains() - <Domain example.com, base_url: https://mail.example.com> + <Domain example.com> Domains can have explicit descriptions, and can be created with one or more owners. @@ -57,16 +57,13 @@ owners. >>> manager.add( ... 'example.net', - ... base_url='http://lists.example.net', ... description='The example domain', ... owners=['anne@example.com']) - <Domain example.net, The example domain, - base_url: http://lists.example.net> + <Domain example.net, The example domain> >>> show_domains(with_owners=True) - <Domain example.com, base_url: https://mail.example.com> - <Domain example.net, The example domain, - base_url: http://lists.example.net> + <Domain example.com> + <Domain example.net, The example domain> - owner: anne@example.com Domains can have multiple owners, ideally one of the owners should have a @@ -76,8 +73,8 @@ configuration's default contact address may be used as a fallback. >>> net_domain = manager['example.net'] >>> net_domain.add_owner('bart@example.org') >>> show_domains(with_owners=True) - <Domain example.com, base_url: https://mail.example.com> - <Domain example.net, The example domain, base_url: http://lists.example.net> + <Domain example.com> + <Domain example.net, The example domain> - owner: anne@example.com - owner: bart@example.org @@ -114,30 +111,17 @@ In the global domain manager, domains are indexed by their email host name. example.net >>> print(manager['example.net']) - <Domain example.net, The example domain, - base_url: http://lists.example.net> + <Domain example.net, The example domain> As with dictionaries, you can also get the domain. If the domain does not exist, ``None`` or a default is returned. :: >>> print(manager.get('example.net')) - <Domain example.net, The example domain, - base_url: http://lists.example.net> + <Domain example.net, The example domain> >>> print(manager.get('doesnotexist.com')) None >>> print(manager.get('doesnotexist.com', 'blahdeblah')) blahdeblah - - -Confirmation tokens -=================== - -Confirmation tokens can be added to the domain's url to generate the URL to a -page users can use to confirm their subscriptions. - - >>> domain = manager['example.net'] - >>> print(domain.confirm_url('abc')) - http://lists.example.net/confirm/abc |
