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

Exchange 2013: The specified charset is not supported. #48

Closed
chris-garrett opened this issue Aug 15, 2016 · 4 comments
Closed

Exchange 2013: The specified charset is not supported. #48

chris-garrett opened this issue Aug 15, 2016 · 4 comments

Comments

@chris-garrett
Copy link

It looks like ms exchange does not like searching with UTF-8. I have found a few pages out there talking about it.

  1. https://social.technet.microsoft.com/Forums/en-US/00bb2ec5-9951-40b4-8ec3-97e5a8f1a59f/imap-search-with-utf8?forum=exchangesvrsecuremessaging
  2. MatterMail (which wraps mxk/go-imap) is trying UTF-8 first and then falling back to US-ASCII. Error on check new email: imap: unexpected completion status (EXCHANGE 2010) rodcorsi/mattermail#7
@emersion
Copy link
Owner

This happens here: https://github.com/emersion/go-imap/blob/master/client/cmd_selected.go#L95

Maybe add a Charset field in imap.SearchCriteria?

@chris-garrett
Copy link
Author

I don't know much at all about IMAP, is there a way to determine the servers capabilities?

@emersion
Copy link
Owner

US-ASCII MUST be supported; other [CHARSET]s MAY be supported.
If the server does not support the specified [CHARSET], it MUST
return a tagged NO response (not a BAD). This response SHOULD
contain the BADCHARSET response code, which MAY list the
[CHARSET]s supported by the server.
-- (RFC 3501 page 50)

So if the server replies with BADCHARSET we should retry with ascii.

@chris-garrett
Copy link
Author

Ok, I will take a look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants