Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for JMAP #1552

Open
ststeiger opened this issue Apr 17, 2023 · 4 comments
Open

Add support for JMAP #1552

ststeiger opened this issue Apr 17, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@ststeiger
Copy link

ststeiger commented Apr 17, 2023

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.

@jstedfast
Copy link
Owner

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.

@jstedfast jstedfast added the enhancement New feature or request label Apr 17, 2023
@ststeiger
Copy link
Author

ststeiger commented May 4, 2023

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).

@jstedfast
Copy link
Owner

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?

@jstedfast
Copy link
Owner

Also file a new bug report about that issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants