Closed kahnclusions closed 1 year ago
Hi,
It seems that Fastmail is generating non-compliant responses according to RFC8621:
The value MUST be one of the Mailbox attribute names listed in the
IANA "IMAP Mailbox Name Attributes" registry at
<https://www.iana.org/assignments/imap-mailbox-name-attributes/>,
as established in [[RFC8457](https://datatracker.ietf.org/doc/html/rfc8457)], converted to lowercase.
I have just checked the list and scheduled
is not a IANA registered mailbox attribute.
In any case, I have just released version 0.3.0
which deserializes unknown roles as Role::Other(String)
.
Cool, that solves the issue 👍
First I wanted to say this is a really awesome project! I've been testing against Fastmail's API and I noticed they add a non-standard "Scheduled" mailbox role that causes the parsing to fail. It would be nice to support this role, or support generic string roles in addition to the defined Roles.
You can send the following request to
https://api.fastmail.com/jmap/api/
and see the roles returned:An easy solution is to add support for the Scheduled role, but it might be more forward-thinking to support arbitrary string roles in addition to the "standard" ones.
https://github.com/stalwartlabs/jmap-client/blob/main/src/mailbox/mod.rs#L116-L135