This repository was archived by the owner on May 24, 2025. It is now read-only.
send mechanism as raw string to fix compatibility issues #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @emersion,
while attempting to use your fantastic library in a project of mine, I stumbed accross the fact that I couldn't activate COMPRESS with the IMAP server of mailbox.org even though the server clearly advertises the capability. From that I can tell, they use Dovecot.
When executing
comp.Compress(compress.Deflate)I'd always getError in IMAP command COMPRESS: Invalid arguments (0.001 + 0.000 secs)..I realized, that COMPRESS seems to work in Thunderbird though and tried to debug the issue.
Turns out, Thunderbird activates COMPRESS like this:
While
go-imap-compressdoes it like thisNotice DEFLATE (no quotes) vs "DEFLATE" (with quotes).
After I did some digging, I realized that changing the arguments of the cmd to RawString would avoid these quotes. I applied this patch and the connection seems to work!
I don't know if this causes compatibility issues with other IMAP servers, I don't see quotes in RFC4978 though. I'm also not sure if I nailed the Parse() code, that method wasn't called and I'm not sure of the intended behaviour there.
Thanks for writing such a nice IMAP library @emersion! I had no prior knowledge of IMAP and even though IMAP itself wasn't intuitive to me I was able to get everything I wanted working so far :)
Thanks & regards,
Johannes