RFC3501 defines an atom string as
astring = 1*ASTRING-CHAR / string
ASTRING-CHAR = ATOM-CHAR / resp-specials
resp-specials = "]"
Javax mail 1.5.1 changed its implementation of Response.readAtom(char) to ignore ']' (Response.class:225). readAtom(char) gets called during a call to readAtomString().
As a result, when parsing a message like "[CLIENTBUG]...", the atom returned is now "[CLIENTBUG", whereas it returned "[CLIENTBUG]" previously. Can this be addressed?
I filed this as a bug, which I'll fix in 1.5.2. I'll push out a SNAPSHOT release shortly that includes the fix.
Thanks for reporting this!