go-imap icon indicating copy to clipboard operation
go-imap copied to clipboard

imapclient: Add a convenience function to enable whatever go-imap supports

Open arnt opened this issue 2 weeks ago • 1 comments

This allows a client to trust go-imap's judgment and not clutter its source with IMAP details.

arnt avatar Dec 09 '25 16:12 arnt

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 UIDONLY and change FetchMessageBuffer to make UID mandatory and deprecate SeqNum.

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?

arnt avatar Dec 10 '25 09:12 arnt