diff options
| author | Barry Warsaw | 2015-06-15 11:44:48 +0000 |
|---|---|---|
| committer | Barry Warsaw | 2015-06-15 11:44:48 +0000 |
| commit | e9799b26ffcdafd04f58d576d597860d073457e0 (patch) | |
| tree | ed79b94d4722df09157301a6189c886f81563efd /src/mailman/interfaces/messages.py | |
| parent | 955abee5c16a4a35f270c54cb8d658c4445b4b18 (diff) | |
| parent | dc1db8a094570c3d74f31e78b4447ae807247c8b (diff) | |
| download | mailman-e9799b26ffcdafd04f58d576d597860d073457e0.tar.gz mailman-e9799b26ffcdafd04f58d576d597860d073457e0.tar.zst mailman-e9799b26ffcdafd04f58d576d597860d073457e0.zip | |
Diffstat (limited to 'src/mailman/interfaces/messages.py')
| -rw-r--r-- | src/mailman/interfaces/messages.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/mailman/interfaces/messages.py b/src/mailman/interfaces/messages.py index 83418a692..9617a879a 100644 --- a/src/mailman/interfaces/messages.py +++ b/src/mailman/interfaces/messages.py @@ -30,42 +30,42 @@ from zope.interface import Interface, Attribute class IMessageStore(Interface): """The interface of the global message storage service. - All messages that are stored in the system live in the message storage - service. A message stored in this service must have a Message-ID header. - The store writes an X-Message-ID-Hash header which contains the Base32 - encoded SHA1 hash of the message's Message-ID header. Any existing - X-Message-ID-Hash header is overwritten. + All messages that are stored in the system live in the message + storage service. A message stored in this service must have a + Message-ID header. The store writes an Message-ID-Hash header which + contains the Base32 encoded SHA1 hash of the message's Message-ID + header. Any existing Message-ID-Hash header is overwritten. - Either the Message-ID or the X-Message-ID-Hash header can be used to + Either the Message-ID or the Message-ID-Hash header can be used to uniquely identify this message in the storage service. While it is possible to see duplicate Message-IDs, this is never correct and the - service is allowed to drop any subsequent colliding messages, or overwrite - earlier messages with later ones. + service is allowed to drop any subsequent colliding messages, or + overwrite earlier messages with later ones. - The combination of the List-Archive header and either the Message-ID or - X-Message-ID-Hash header can be used to retrieve the message from the - internet facing interface for the message store. This can be considered a - globally unique URI to the message. + The combination of the List-Archive header and either the Message-ID + or Message-ID-Hash header can be used to retrieve the message from + the internet facing interface for the message store. This can be + considered a globally unique URI to the message. For example, a message with the following headers: Message-ID: <87myycy5eh.fsf@uwakimon.sk.tsukuba.ac.jp> Date: Wed, 04 Jul 2007 16:49:58 +0900 List-Archive: http://archive.example.com/ - X-Message-ID-Hash: RXTJ357KFOTJP3NFJA6KMO65X7VQOHJI + Message-ID-Hash: RXTJ357KFOTJP3NFJA6KMO65X7VQOHJI the globally unique URI would be: http://archive.example.com/RXTJ357KFOTJP3NFJA6KMO65X7VQOHJI - """ +""" def add(message): """Add the message to the store. :param message: An email.message.Message instance containing at least a unique Message-ID header. The message will be given an - X-Message-ID-Hash header, overriding any existing such header. - :returns: The calculated X-Message-ID-Hash header. + Message-ID-Hash header, overriding any existing such header. + :returns: The calculated Message-ID-Hash header. :raises ValueError: if the message is missing a Message-ID header. The storage service is also allowed to raise this exception if it find, but disallows collisions. @@ -79,9 +79,9 @@ class IMessageStore(Interface): """ def get_message_by_hash(message_id_hash): - """Return the message with the matching X-Message-ID-Hash. + """Return the message with the matching Message-ID-Hash. - :param message_id_hash: The X-Message-ID-Hash header contents to + :param message_id_hash: The Message-ID-Hash header contents to search for. :returns: The message, or None if no matching message was found. """ |
