Open ststeiger opened 1 year ago
I've actually been thinking of doing this for the past year or so, it's just hard to find the time to work on it. I was also hoping to see if I could find a way to get Fastmail to pay me to write it :-)
The amount of free time I have available has fallen dramatically over the past 2-3 years.
Yea, so has mine since I have my own house.
By the way I noticed your IMAP handling falls on its nose when the IMAP server writes utf8-responses WITH bom. Thunderbird is cool with utf8-BOM in streams.
ChatGPT says, on whether or not RFC 3501 says that the stream needs/can/mustn't have a Byte-Order-Mark:
The IMAP Mail RFC 3501 does not specify anything specific about the presence or absence of a byte-order mark (BOM) in the UTF-8 responses sent over TCP. However, the Unicode Standard, which defines the UTF-8 encoding, recommends against including a BOM in UTF-8-encoded files, as it can cause interoperability issues with some software and is generally unnecessary for UTF-8. Therefore, it is generally best practice to omit the BOM in UTF-8 responses sent over TCP for maximum compatibility with different software implementations.
So strictly speaking, while it was good for me to notice the "error" on my server, MailKit should also work if there is a BOM, which it currently doesn't (AFAIK - unless there are options and this is just the default).
Can you get a protocol log and zip it up and send it to me? I need the BOMs to be in the log so that I can write up some unit tests that expose this issue and also so I can test that any fix I do works.
If you can anonymize the content a bit, then feel free to do that - if not, I'll do it before adding it to the unit tests.
What you might be able to do is create a new IMAP folder, add some test messages to it, then get a log of a FETCH request in that folder. I assume the BOMs are in each and every string
token in the ENVELOPE and/or BODYSTRUCTURE responses?
Also file a new bug report about that issue...
I am implementing a JMAP-Server. I should be able to test the JMAP-Server. The POP3 Server i implemented, i tested with MailKit. There is an existing libary (JMapNet), but it is not very pleasant to use. Plus, if one were to write an email client with MailKit, it would be nice to have support for all email protocols.