summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog17
-rw-r--r--account.c4
-rw-r--r--mutt_sasl.c2
-rw-r--r--smtp.c14
4 files changed, 17 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 68bf4cf3..6d817a33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-07-01 23:24 +0200 Rocco Rutte <pdmef@gmx.net> (9a5f4364c166)
+
+ * doc/manual.xml.head: Manual: Add detailed section on charset
+ handling
+
+ * smtp.c: SMTP: use $smtp_pass in batch mode. Closes #3289.
+
+ mutt_account_getpass() copying the password from $smtp_pass into the
+ account structure is only called from the SASL callback we only use
+ if we're sure we don't need curses (i.e. have the pass already).
+
2009-06-30 17:32 +0200 Rocco Rutte <pdmef@gmx.net> (f4baa2f1251a)
* pgpewrap.c: Add missing config.h include to pgpewrap.c
@@ -5,8 +16,6 @@
It technically doesn't need it, but pgpewrap should be rebuilt after
configure ran, too.
-2009-06-30 17:31 +0200 Rocco Rutte <pdmef@gmx.net> (7c8f018d33a5)
-
* doc/Makefile.am: Manual: Run lynx with --display_charset
=us-ascii, see #3286.
@@ -31,12 +40,8 @@
* configure.ac, curs_lib.c: Allow tabs in index subject. Closes #3270.
-2009-06-28 20:21 -0700 Brendan Cully <brendan@kublai.com> (ecea9568202f)
-
* imap/util.c: Allow ImapDelimChars to be unset
-2009-06-28 19:21 -0700 Brendan Cully <brendan@kublai.com> (ef6523d11f24)
-
* mutt.h: Rename struct thread to struct mutt_thread. Closes #3279.
* imap/command.c: Not being able to start an IMAP command
diff --git a/account.c b/account.c
index b305f788..f7389914 100644
--- a/account.c
+++ b/account.c
@@ -155,6 +155,8 @@ int mutt_account_getuser (ACCOUNT* account)
else if ((account->type == M_ACCT_TYPE_POP) && PopUser)
strfcpy (account->user, PopUser, sizeof (account->user));
#endif
+ else if (option (OPTNOCURSES))
+ return -1;
/* prompt (defaults to unix username), copy into account->user */
else
{
@@ -215,6 +217,8 @@ int mutt_account_getpass (ACCOUNT* account)
else if ((account->type == M_ACCT_TYPE_SMTP) && SmtpPass)
strfcpy (account->pass, SmtpPass, sizeof (account->pass));
#endif
+ else if (option (OPTNOCURSES))
+ return -1;
else
{
snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "),
diff --git a/mutt_sasl.c b/mutt_sasl.c
index 0f4454cb..e85970db 100644
--- a/mutt_sasl.c
+++ b/mutt_sasl.c
@@ -304,7 +304,7 @@ int mutt_sasl_interact (sasl_interact_t* interaction)
snprintf (prompt, sizeof (prompt), "%s: ", interaction->prompt);
resp[0] = '\0';
- if (mutt_get_field (prompt, resp, sizeof (resp), 0))
+ if (option (OPTNOCURSES) || mutt_get_field (prompt, resp, sizeof (resp), 0))
return SASL_FAIL;
interaction->len = mutt_strlen (resp)+1;
diff --git a/smtp.c b/smtp.c
index d0b2eb50..a718006b 100644
--- a/smtp.c
+++ b/smtp.c
@@ -347,12 +347,6 @@ static int smtp_fill_account (ACCOUNT* account)
if (url.scheme == U_SMTPS)
account->flags |= M_ACCT_SSL;
- if (!(account->flags & M_ACCT_PASS) && SmtpPass && *SmtpPass)
- {
- strfcpy (account->pass, SmtpPass, sizeof (account->pass));
- account->flags |= M_ACCT_PASS;
- }
-
if (!account->port)
{
if (account->flags & M_ACCT_SSL)
@@ -460,12 +454,6 @@ static int smtp_open (CONNECTION* conn)
}
#ifdef USE_SASL
- if (!(conn->account.flags & M_ACCT_PASS) && option (OPTNOCURSES))
- {
- mutt_error (_("Interactive SMTP authentication not supported"));
- mutt_sleep (1);
- return -1;
- }
return smtp_auth (conn);
#else
mutt_error (_("SMTP authentication requires SASL"));
@@ -609,7 +597,7 @@ static int smtp_auth_sasl (CONNECTION* conn, const char* mechlist)
}
}
strfcpy (buf + len, "\r\n", sizeof (buf) - len);
- } while (rc == smtp_ready);
+ } while (rc == smtp_ready && saslrc != SASL_FAIL);
if (smtp_success (rc))
{