IMAP解析器或服务器示例

I've been assigned to build an IMAP server with Go, and after a bit of research I figured I'll have to build it all by myself, so before I do anything I want to know what you guys think. I need some IMAP parser or a server example. Thanks in advance!

IMAP is a simple textual protocol which is very similar to SMTP in this regard, so check out how net/smtp is implemented.

And server-side IMAP implementation differ from client side only in that it most of the time responds to commands, not initiate them, so check out existing client implementation.