On 12/5/24 14:26, Bryan Fields wrote:
On 12/5/24 2:02 PM, Mark Sapiro wrote:
A bit obscure for laypersons, but one can compute the message_id_hash
from the Message-ID
```
from base64 import b32encode
from hashlib import sha1
def get_message_id_hash(msg_id):
return b32encode(sha1(msg_id).digest()).decode()
```
Actually, that should be
return b32encode(sha1(msg_id.encode()).digest()).decode()
as sha1 wants bytes. I actually made a very simple command lime
converter for myself
```
#!/usr/bin/env python3
import sys
from base64 import b32encode
from hashlib import sha1
print(b32encode(sha1(sys.argv[1].encode()).digest()).decode())
```
This is great to know. I assume the thread ID is generated the same way?
The thread ID is the message_id_hash of the first message in the thread,
so yes.
--
Mark Sapiro <m...@msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
_______________________________________________
Mailman-users mailing list -- mailman-users@mailman3.org
To unsubscribe send an email to mailman-users-le...@mailman3.org
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at:
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/FNDYXYAMO6M3ZXUNZGKKPGX3EUCW7UEQ/
This message sent to arch...@mail-archive.com