diff -r 8f85262fbe8a Doc/library/imaplib.rst --- a/Doc/library/imaplib.rst Sun Jul 06 02:24:24 2014 -0400 +++ b/Doc/library/imaplib.rst Wed Jul 16 17:16:24 2014 -0700 @@ -470,6 +470,16 @@ M.store(num, '+FLAGS', '\\Deleted') M.expunge() + .. note:: + + .. index:: single: Brackets + + Creating flags containing ']' violates the `RFC 3501 + `_ and the IMAP + protocol. However, popular IMAP servers, such as Gmail, accepts flags + with brackets like "[test]" despite the violation. Thus, :mod:`imaplib` + allows you create and access flags with brackets for backwards + compatibility reasons. .. method:: IMAP4.subscribe(mailbox)