/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2021 the Claws Mail team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
break;
#ifdef USE_GNUTLS
case MAILIMAP_ERROR_SSL:
- MY_LOG_WARNING(g_strconcat(_("IMAP error on %s:"), " ", _("SSL/TLS error"), "\n", NULL), session_server)
+ MY_LOG_WARNING(g_strconcat(_("IMAP error on %s:"), " ", _("TLS error"), "\n", NULL), session_server)
break;
#endif
default:
ok = imap_cmd_login(session, user, pass, "SCRAM-SHA-1");
if (ok == MAILIMAP_ERROR_LOGIN && imap_has_capability(session, "PLAIN"))
ok = imap_cmd_login(session, user, pass, "PLAIN");
- if (ok == MAILIMAP_ERROR_LOGIN && imap_has_capability(session, "XOAUTH2"))
- ok = imap_cmd_login(session, user, pass, "XOAUTH2");
if (ok == MAILIMAP_ERROR_LOGIN && imap_has_capability(session, "LOGIN"))
ok = imap_cmd_login(session, user, pass, "LOGIN");
if (ok == MAILIMAP_ERROR_LOGIN && imap_has_capability(session, "GSSAPI"))
ok = imap_cmd_login(session, user, pass, "GSSAPI");
if (ok == MAILIMAP_ERROR_LOGIN) /* we always try plaintext login before giving up */
ok = imap_cmd_login(session, user, pass, "plaintext");
+ if (ok == MAILIMAP_ERROR_LOGIN && imap_has_capability(session, "XOAUTH2"))
+ ok = imap_cmd_login(session, user, pass, "XOAUTH2");
}
if (ok == MAILIMAP_NO_ERROR)
"LOGIN SASL plugin is installed.");
}
+ if (type == IMAP_AUTH_OAUTH2) {
+ ext_info = _("\n\nOAuth2 error. Check and correct your OAuth2 "
+ "account preferences.");
+ }
+
if (time(NULL) - last_login_err > 10) {
if (!prefs_common.no_recv_err_panel) {
alertpanel_error_log(_("Connection to %s failed: "
if (account->ssl_imap != SSL_NONE) {
if (alertpanel_full(_("Insecure connection"),
_("This connection is configured to be secured "
- "using SSL/TLS, but SSL/TLS is not available "
+ "using TLS, but TLS is not available "
"in this build of Claws Mail. \n\n"
"Do you want to continue connecting to this "
"server? The communication would not be "
else {
#ifdef USE_GNUTLS
if (r == MAILIMAP_ERROR_SSL)
- log_error(LOG_PROTOCOL, _("SSL/TLS handshake failed\n"));
+ log_error(LOG_PROTOCOL, _("TLS handshake failed\n"));
else
#endif
imap_handle_error(NULL, account->recv_server, r);
SESSION(session)->sock = NULL;
imap_safe_destroy(session);
}
+ imap_session_destroy(session);
+ session_destroy(SESSION(session));
return NULL;
}
msginfo = (MsgInfo *)msglist->data;
src = msginfo->folder;
if (!same_dest_ok && src == dest) {
- g_warning("the src folder is identical to the dest.");
+ g_warning("the src folder is identical to the dest");
return -1;
}
new_item = imap_create_folder(folder, item, name);
if (!new_item) {
- g_warning("Can't create '%s'", name);
+ g_warning("can't create '%s'", name);
if (!folder->inbox) return NULL;
new_item = imap_create_folder(folder, folder->inbox, name);
if (!new_item)
- g_warning("Can't create '%s' under INBOX", name);
+ g_warning("can't create '%s' under INBOX", name);
else
new_item->stype = stype;
} else
gchar *cached_msg = imap_get_cached_filename(parent, to_number(name));
if (is_file_exist(cached_msg)) {
if (claws_unlink(cached_msg) != 0) {
+ g_free(cached_msg);
return NULL;
}
}
+ g_free(cached_msg);
}
debug_print("getting session...\n");
separator = imap_get_path_separator(session, IMAP_FOLDER(folder), imap_path, &ok);
if (is_fatal(ok)) {
+ g_free(dirpath);
g_free(imap_path);
return NULL;
}
if (strchr(name, imap_get_path_separator(session, IMAP_FOLDER(folder), item->path, &ok)) != NULL ||
is_fatal(ok)) {
- g_warning("New folder name must not contain the namespace "
- "path separator");
+ g_warning("new folder name must not contain the namespace path separator");
return -1;
}