mAllowCleartextLogins = server.getBooleanAttr(Provisioning.A_zimbraImapCleartextLoginEnabled, false);
boolean allowCleartextLogins = server.getBooleanAttr(Provisioning.A_zimbraImapCleartextLoginEnabled, false);
    public synchronized static void startup() throws ServiceException, IOException {        if (mServer != null)            return;        OzConnectionHandlerFactory imapHandlerFactory = new OzConnectionHandlerFactory() {            public OzConnectionHandler newConnectionHandler(OzConnection conn) {                return new OzImapConnectionHandler(conn);            }        };        Server server = Provisioning.getInstance().getLocalServer();        mAllowCleartextLogins = server.getBooleanAttr(Provisioning.A_zimbraImapCleartextLoginEnabled, false);        String address = server.getAttr(Provisioning.A_zimbraImapBindAddress, null);        int port = server.getIntAttr(Provisioning.A_zimbraImapBindPort, Config.D_IMAP_BIND_PORT);        ServerSocket serverSocket = NetUtil.getBoundServerSocket(address, port, false);        mServer = new OzServer("IMAP", IMAP_READ_BUFFER_SIZE, serverSocket, imapHandlerFactory, ZimbraLog.imap);        mServer.setSnooper(new OzSnooper(ZimbraLog.imap, OzSnooper.ALL));        mServer.start();                String name = server.getAttr(Provisioning.A_zimbraImapAdvertisedName, null);        if (name == null || name.trim().equals(""))            name = server.getAttr(Provisioning.A_zimbraServiceHostname, null);        if (name == null || name.trim().equals(""))            name = "localhost";                mBanner  = "OK " + name + " Zimbra IMAP4rev1 service ready";        mGoodbye = "BYE Zimbra IMAP4rev1 server terminating connection";    }