diff --git a/src/java/davmail/imap/ImapConnection.java b/src/java/davmail/imap/ImapConnection.java index 0bcc8f1d..c211c53d 100644 --- a/src/java/davmail/imap/ImapConnection.java +++ b/src/java/davmail/imap/ImapConnection.java @@ -115,11 +115,11 @@ public class ImapConnection extends AbstractConnection { state = State.AUTHENTICATED; } catch (Exception e) { DavGatewayTray.error(e); - if (Settings.getBooleanProperty("davmail.enableKerberos")) { - // Kerberos authentication failed - throw e; - } - sendClient(commandId + " NO LOGIN failed"); + if (Settings.getBooleanProperty("davmail.enableKerberos")) { + sendClient(commandId + " NO LOGIN Kerberos authentication failed"); + } else { + sendClient(commandId + " NO LOGIN failed"); + } state = State.INITIAL; } } else if ("AUTHENTICATE".equalsIgnoreCase(command)) {