summaryrefslogtreecommitdiff
path: root/src/mailman/archiving/prototype.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/archiving/prototype.py')
-rw-r--r--src/mailman/archiving/prototype.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mailman/archiving/prototype.py b/src/mailman/archiving/prototype.py
index b5df11f78..73c296b5d 100644
--- a/src/mailman/archiving/prototype.py
+++ b/src/mailman/archiving/prototype.py
@@ -58,10 +58,13 @@ class Prototype:
@staticmethod
def permalink(mlist, msg):
"""See `IArchiver`."""
- # It is the LMTP server's responsibility to ensure that the message
- # has a X-Message-ID-Hash header. If it doesn't then there's no
+ # It is the LMTP server's responsibility to ensure that the message has
+ # a Message-ID-Hash header. For backward compatibility, fall back to
+ # X-Message-ID-Hash. If the message has neither, then there's no
# permalink.
- message_id_hash = msg.get('x-message-id-hash')
+ message_id_hash = msg.get('message-id-hash')
+ if message_id_hash is None:
+ message_id_hash = msg.get('x-message-id-hash')
if message_id_hash is None:
return None
if isinstance(message_id_hash, bytes):