pu.setUrl(mAdminUrl);
pu.setUrl(DEFAULT_ADMIN_URL);
    public static void main(String args[]) throws IOException, ParseException, ServiceException {        Zimbra.toolSetup();        ZMailboxUtil pu = new ZMailboxUtil();        CommandLineParser parser = new GnuParser();        Options options = new Options();        options.addOption("a", "admin", true, "admin account name to auth as");        options.addOption("z", "zadmin", false, "use zimbra admin name/password from localconfig for admin/password");                options.addOption("h", "help", false, "display usage");        options.addOption("f", "file", true, "use file as input stream");         options.addOption("u", "url", true, "http[s]://host[:port] of server to connect to");        options.addOption("m", "mailbox", true, "mailbox to open");        options.addOption("p", "password", true, "password for admin/mailbox");        options.addOption("P", "passfile", true, "filename with password in it");        options.addOption("v", "verbose", false, "verbose mode");        options.addOption("d", "debug", false, "debug mode");                        CommandLine cl = null;        boolean err = false;                try {            cl = parser.parse(options, args, true);        } catch (ParseException pe) {            System.err.println("error: " + pe.getMessage());            err = true;        }                    if (err || cl.hasOption('h')) {            pu.usage();        }                pu.setVerbose(cl.hasOption('v'));        if (cl.hasOption('a')) {            pu.setAdminAccountName(cl.getOptionValue('a'));            pu.setUrl(mAdminUrl);                    }        if (cl.hasOption('z')) {            pu.setAdminAccountName(LC.zimbra_ldap_user.value());            pu.setPassword(LC.zimbra_ldap_password.value());            pu.setUrl(mAdminUrl);        }        if (cl.hasOption('u')) pu.setUrl(cl.getOptionValue('u'));        if (cl.hasOption('m')) pu.setMailboxName(cl.getOptionValue('m'));                if (cl.hasOption('p')) pu.setPassword(cl.getOptionValue('p'));        if (cl.hasOption('P')) {            pu.setPassword(StringUtil.readSingleLineFromFile(cl.getOptionValue('P')));        }                if (cl.hasOption('d')) pu.setDebug(true);        args = cl.getArgs();        pu.setInteractive(args.length < 1);        try {            pu.initMailbox();            if (args.length < 1) {                InputStream is = cl.hasOption('f') ? new FileInputStream(cl.getOptionValue('f')) : System.in;;                 pu.interactive(new BufferedReader(new InputStreamReader(is)));            } else {                if (pu.execute(args) == ExecuteStatus.UNKNOWN_COMMAND)                    pu.usage();            }        } catch (ServiceException e) {            Throwable cause = e.getCause();            System.err.println("ERROR: " + e.getCode() + " (" + e.getMessage() + ")" +                     (cause == null ? "" : " (cause: " + cause.getClass().getName() + " " + cause.getMessage() + ")"));            if (pu.mGlobalVerbose) e.printStackTrace(System.err);                        System.exit(2);        }    }