86
88
It is also available via the location given in the response.
90
>>> dump_json('http://localhost:9001/3.0/lists/test-two.example.com')
91
display_name: Test-two
92
fqdn_listname: test-two@example.com
94
list_id: test-two.example.com
96
mail_host: example.com
98
self_link: http://localhost:9001/3.0/lists/test-two.example.com
101
Normally, you access the list via its RFC 2369 list-id as shown above, but for
102
backward compatibility purposes, you can also access it via the list's posting
103
address, if that has never been changed (since the list-id is immutable, but
104
the posting address is not).
88
106
>>> dump_json('http://localhost:9001/3.0/lists/test-two@example.com')
89
107
display_name: Test-two
90
108
fqdn_listname: test-two@example.com
110
list_id: test-two.example.com
92
111
list_name: test-two
93
112
mail_host: example.com
95
self_link: http://localhost:9001/3.0/lists/test-two@example.com
114
self_link: http://localhost:9001/3.0/lists/test-two.example.com
98
117
However, you are not allowed to create a mailing list in a domain that does
122
141
``DELETE`` on the mailing list URL.
125
>>> dump_json('http://localhost:9001/3.0/lists/test-two@example.com',
144
>>> dump_json('http://localhost:9001/3.0/lists/test-two.example.com',
126
145
... method='DELETE')
127
146
content-length: 0
132
# The above starts a Storm transaction, which will lock the database
133
# unless we abort it.
134
>>> transaction.abort()
136
151
The mailing list does not exist.
138
153
>>> print list_manager.get('test-two@example.com')
156
# Unlock the database.
157
>>> transaction.abort()
141
159
You cannot delete a mailing list that does not exist or has already been
145
>>> dump_json('http://localhost:9001/3.0/lists/test-two@example.com',
147
Traceback (most recent call last):
149
HTTPError: HTTP Error 404: 404 Not Found
151
>>> dump_json('http://localhost:9001/3.0/lists/test-ten@example.com',
153
Traceback (most recent call last):
155
HTTPError: HTTP Error 404: 404 Not Found
163
>>> dump_json('http://localhost:9001/3.0/lists/test-two.example.com',
165
Traceback (most recent call last):
167
HTTPError: HTTP Error 404: 404 Not Found
169
>>> dump_json('http://localhost:9001/3.0/lists/test-ten.example.com',
171
Traceback (most recent call last):
173
HTTPError: HTTP Error 404: 404 Not Found
175
For backward compatibility purposes, you can delete a list via its posting
178
>>> dump_json('http://localhost:9001/3.0/lists/test-one@example.com',
185
The mailing list does not exist.
187
>>> print list_manager.get('test-one@example.com')