imapclient: Add a convenience function to enable whatever go-imap supports
This allows a client to trust go-imap's judgment and not clutter its source with IMAP details.
I woke up this morning with mixed feelings.
This is a protocol, in the old Microsoft sense of the word: A series of function calls that don't necessarily make overwhelming sense to the user. This mentions 9051 and not 3501, but the code uses 3501 by default and (this is a three-step protocol description ⇒) to use 9051, you dial, login and then call EnableAll. Why that last? It makes sense to people with deep IMAP expertise, less sense to a more general audience. A typical "protocol" sequence of calls.
I'd like to do two things:
- make EnableAll the default,
- in a separate PR, add the remaining bits of support for
UIDONLYand change FetchMessageBuffer to makeUIDmandatory and deprecateSeqNum.
This would simplify the API, make all client applications use the same set of extensions, and eliminate the possibility of bugs such as happen when people have the same SeqNum for different messages.
What do you think?