todosrht-lmtp: try a bit harder to parse msg ID
Even though it is rarely used, the full format of the Message-ID header is (grossly simplified): "Comment to be ignored <actual@message.id>", similar to an address. Parsing this as address will still be a bit too lax (it would accept quoted string literals on the left-id side), but it's at least much better than the current approach.
This commit is contained in:
parent
7348b4a29b
commit
fb651a7997
|
@ -177,7 +177,7 @@ class MailHandler:
|
|||
input = {
|
||||
"text": body,
|
||||
"senderId": sender.id,
|
||||
"messageId": mail["Message-ID"].removeprefix("<").removesuffix(">"),
|
||||
"messageId": parseaddr(mail["Message-ID"])[1],
|
||||
}
|
||||
|
||||
cmds = ["!resolve", "!resolved", "!reopen"]
|
||||
|
|
Loading…
Reference in New Issue