You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In testing for #104 I observed that IMAP search in Office365 returns NO [BADCHARSET (US-ASCII)] The specified charset is not supported. This error is reporting that for search only US-ASCII is the only supported charset parameter for search. In JakartaMail, we can set the mail.mime.charset to try to force US-ASCII as the charset used for search but JakartaMail will canonicalize US-ASCII to ISO-8859-1 which is not allowed as the search charset for Office365. The only way to make server side searching in Office365 work would be to set mail.mime.charset=US-ASCII and ship META-INF/javamail.charset.map file that doesn't have the mime2java mapping of us-ascii=ISO-8859-1.
Searching still work (by default) though because AngusMail will fallback to performing the search on the client size by fetching the envelope of every message which is slow.
The changes to explore for this ticket are:
Update IMAPProtocol.searchCharsets array to include an entry for US-ASCII.
SearchQuery doesn't report encoding errors which changes the flow in IMAPFolder. The main issue is that server side search can return zero results but the reason it returned zero results was due to the fact that the bytes generated can't be encoded correctly. Instead an IOException should have been generated. (Move this to a new ticket)
Review the IMAP RFC to see if BADCHARSET response codes have been added to the spec. This would allow us to parse the returned list of supported charsets from a BADCHARSET and add them to the IMAPProtocol.searchCharsets. We could consider doing this anyway if it is not in spec.
The text was updated successfully, but these errors were encountered:
In testing for #104 I observed that IMAP search in Office365 returns NO [BADCHARSET (US-ASCII)] The specified charset is not supported. This error is reporting that for search only US-ASCII is the only supported charset parameter for search. In JakartaMail, we can set the
mail.mime.charset
to try to force US-ASCII as the charset used for search but JakartaMail will canonicalize US-ASCII to ISO-8859-1 which is not allowed as the search charset for Office365. The only way to make server side searching in Office365 work would be to setmail.mime.charset=US-ASCII
and ship META-INF/javamail.charset.map file that doesn't have the mime2java mapping of us-ascii=ISO-8859-1.Searching still work (by default) though because AngusMail will fallback to performing the search on the client size by fetching the envelope of every message which is slow.
The changes to explore for this ticket are:
US-ASCII
.The text was updated successfully, but these errors were encountered: