private boolean authenticatingToMailbox() {
        sendToMailbox("USER " + konto.getUser());
        if (readFromMailbox().startsWith("+OK ")) {
            sendToMailbox("PASS " + konto.getPassword());
            if (readFromMailbox().startsWith("+OK")) {
                try {
                    logfile.update(" + Authenticating is ok");
                } catch (FileNotFoundException e) {
                    System.out.println("Logfile not found");
                }
                return true;
            }else {
                try {
                    logfile.update(" - Authenticating is not ok");
                } catch (FileNotFoundException e) {
                    e.printStackTrace();
                }
            }
        }
        return false;
    }