+2003-02-18 [colin] 0.8.10claws23
+
+ * src/common/smtp.[ch]
+ src/prefs_account.c
+ Try to starttls if it seems to be the only
+ way to authenticate a user
+
2003-02-18 [paul] 0.8.10claws22
* src/Makefile.am
else
val = smtp_helo(session, domain);
if (val != SM_OK) {
- log_warning(_("Error occurred while sending HELO\n"));
+ log_warning(use_esmtp? _("Error occurred while sending EHLO\n"):
+ _("Error occurred while sending HELO\n"));
return val;
}
#if USE_OPENSSL
+ /* if we have a user to authenticate and no auth methods, but starttls,
+ try to starttls */
+ if (ssl_type == SSL_NONE && avail_auth_type == SMTPAUTH_TLS_AVAILABLE
+ && user != NULL)
+ ssl_type = SSL_STARTTLS;
+
if (ssl_type == SSL_STARTTLS) {
val = smtp_starttls(session);
if (val != SM_OK) {
*avail_auth_type |= SMTPAUTH_CRAM_MD5;
if (strcasestr(p, "DIGEST-MD5"))
*avail_auth_type |= SMTPAUTH_DIGEST_MD5;
+ } else if (g_strncasecmp(p, "STARTTLS", 8) == 0) {
+ p += 9;
+ *avail_auth_type |= SMTPAUTH_TLS_AVAILABLE;
}
} else if ((buf[0] == '1' || buf[0] == '2' || buf[0] == '3') &&
(buf[3] == ' ' || buf[3] == '\0'))
{
SMTPAUTH_LOGIN = 1 << 0,
SMTPAUTH_CRAM_MD5 = 1 << 1,
- SMTPAUTH_DIGEST_MD5 = 1 << 2
+ SMTPAUTH_DIGEST_MD5 = 1 << 2,
+ SMTPAUTH_TLS_AVAILABLE = 1 << 3
} SMTPAuthType;
typedef enum
CREATE_RADIO_BUTTONS(vbox5,
smtp_nossl_radiobtn,
- _("Don't use SSL"),
+ _("Don't use SSL (or STARTTLS only if necessary)"),
SSL_NONE,
smtp_ssltunnel_radiobtn,
_("Use SSL for SMTP connection"),