You wrote: > The problem is that we have public javax.mail API's that return class > instances from the internal package com.sun.mail. Really? My reading was that the javax.mail.Folder is clean. The problem is that some key public methods com.sun.mail.imap.IMAPFolder do not have corresponding methods in a javax.mail.* interface. The net result is that someone trying to access the "IMAP ACL extension" functionality cannot avoid using vendor specific APIs. The same applies to other IMAP functionality and to functionality in the other providers. Someone ought to report this to Sun as a defect in the JavaMail 1.3 APIs. The APIs have not been touched since JSR 919 in 2002! -- Steve