apache / incubator-ponymail-foal

Apache Pony Mail Foal (Next Generation Suite)
https://ponymail.apache.org
Apache License 2.0
23 stars 14 forks source link

archiver/importer can truncate message-id #203

Closed sebbASF closed 2 years ago

sebbASF commented 2 years ago

It looks like the parser truncates the message-id if it contains a semi-colon.

https://lists.apache.org/api/source.lua?id=rlw0sj74by7vbcr1ynt7l7kl9p2wlcph has: Message-ID: 1641082187.abc;;eefgij@whimsy-vm6.apache.org

whereas: https://lists.apache.org/api/email.lua?id=rlw0sj74by7vbcr1ynt7l7kl9p2wlcph has: "message-id": "<1641082187.abc",

Now ';' is not really supposed to be present in modern message-ids, however ids are supposed to allow them when quoted.

However that does not work either: https://lists.apache.org/api/source.lua?id=yz6wszdlymfbwl9d9hnboj00dy06shxr https://lists.apache.org/api/email.lua?id=yz6wszdlymfbwl9d9hnboj00dy06shxr

sebbASF commented 2 years ago

Ponymail classic did not have the same issue

sebbASF commented 2 years ago

It looks like this is caused by changes to the Python email parser. Further investigation needed

sebbASF commented 2 years ago

There are indeed changes to the parser. It is less lenient than the old parser, however it does appear to be compatible with the current syntax.

It turns out that the second test referenced above is not valid syntax - a quoted string can only appear as the entire LHS before the id.

So although this is a change from classic Ponymail, absent further evidence it is not a bug