The imaplib module is a really thin shell over IMAP4rev1 and expects you to know almost all of this. The protocol is described in RFC 3501 (although imaplib was actually written against the obsolete RFC 2060. ) There are several less ... esoteric IMAP4 implementations for Python, such as those twisted.mailthat are much more difficult to work with.
source
share