Ticket #2860: mutt-1.5.20-interactivesmtp.patch

File mutt-1.5.20-interactivesmtp.patch, 1.8 KB (added by krendoshazin, 15 years ago)

Mutt 1.5.20 Interactive SMTP fix

  • account.c

    old new  
    155155  else if ((account->type == M_ACCT_TYPE_POP) && PopUser)
    156156    strfcpy (account->user, PopUser, sizeof (account->user));
    157157#endif
     158  else if (option (OPTNOCURSES))
     159    return -1;
    158160  /* prompt (defaults to unix username), copy into account->user */
    159161  else
    160162  {
     
    215217  else if ((account->type == M_ACCT_TYPE_SMTP) && SmtpPass)
    216218    strfcpy (account->pass, SmtpPass, sizeof (account->pass));
    217219#endif
     220  else if (option (OPTNOCURSES))
     221    return -1;
    218222  else
    219223  {
    220224    snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "),
  • mutt_sasl.c

    old new  
    304304
    305305    snprintf (prompt, sizeof (prompt), "%s: ", interaction->prompt);
    306306    resp[0] = '\0';
    307     if (mutt_get_field (prompt, resp, sizeof (resp), 0))
     307    if (option (OPTNOCURSES) || mutt_get_field (prompt, resp, sizeof (resp), 0))
    308308      return SASL_FAIL;
    309309
    310310    interaction->len = mutt_strlen (resp)+1;
  • mutt-1.5.

    old new  
    454454    }
    455455
    456456#ifdef USE_SASL
    457     if (!(conn->account.flags & M_ACCT_PASS) && option (OPTNOCURSES))
    458     {
    459       mutt_error (_("Interactive SMTP authentication not supported"));
    460       mutt_sleep (1);
    461       return -1;
    462     }
    463457    return smtp_auth (conn);
    464458#else
    465459    mutt_error (_("SMTP authentication requires SASL"));
     
    603597      }
    604598    }
    605599    strfcpy (buf + len, "\r\n", sizeof (buf) - len);
    606   } while (rc == smtp_ready);
     600  } while (rc == smtp_ready && saslrc != SASL_FAIL);
    607601
    608602  if (smtp_success (rc))
    609603  {