From: Antonio Radici Date: Sun, 13 Sep 2009 18:29:42 +0000 (+0100) Subject: upstream/544794-smtp-batch.patch: mutt won't ask for a password if smtp_user and... X-Git-Tag: debian/1.5.20-3~2 X-Git-Url: https://git.llucax.com/software/mutt-debian.git/commitdiff_plain/03799e24b23b9a04aee38d40898625a71b92b5e6?ds=sidebyside;hp=26cfb9f120b0958f106aacbf90c8ca3d08077f0d upstream/544794-smtp-batch.patch: mutt won't ask for a password if smtp_user and smtp_pass are set in .muttrc (Closes: 544794) --- diff --git a/debian/changelog b/debian/changelog index 32f3788..0d19fc6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,6 +30,8 @@ mutt (1.5.20-3) unstable; urgency=low hightlighting if text_flowed was set to 'yes' (Closes: 533520) + upstream/542817-smimekeys-tmpdir.patch: smime_keys.pl will skip tmpdir if it contains '=' (Closes: 542817) + + upstream/544794-smtp-batch.patch: mutt won't ask for a password if + smtp_user and smtp_pass are set in .muttrc (Closes: 544794) * debian/control: + Standards-Version bumped to 3.8.3 * debian/extra/lib/mailto-mutt: patch from madduck@ to correctly handle the diff --git a/debian/patches/upstream/544794-smtp-batch.patch b/debian/patches/upstream/544794-smtp-batch.patch new file mode 100644 index 0000000..953873c --- /dev/null +++ b/debian/patches/upstream/544794-smtp-batch.patch @@ -0,0 +1,68 @@ +Without this patch mutt fails to send messages and ask for a password even if +smtp_user and smtp_pass are defined in .muttrc, see upstream bug +http://bugs.mutt.org/3289 + +--- a/account.c ++++ b/account.c +@@ -155,6 +155,8 @@ + 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 @@ + 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: "), +--- a/mutt_sasl.c ++++ b/mutt_sasl.c +@@ -304,7 +304,7 @@ + + 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; +--- a/smtp.c ++++ b/smtp.c +@@ -172,7 +172,7 @@ + progress_t progress; + struct stat st; + int r, term = 0; +- size_t buflen; ++ size_t buflen = 0; + + fp = fopen (msgfile, "r"); + if (!fp) +@@ -454,12 +454,6 @@ + } + + #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")); +@@ -603,7 +597,7 @@ + } + } + strfcpy (buf + len, "\r\n", sizeof (buf) - len); +- } while (rc == smtp_ready); ++ } while (rc == smtp_ready && saslrc != SASL_FAIL); + + if (smtp_success (rc)) + {