From: Rocco Rutte Date: Thu, 28 May 2009 14:37:44 +0000 (+0200) Subject: SMTP: don't interactively authenticate without a password in batch/mailx mode X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3149ebf49dc4a5c53262350642ec1063ff4437ce;p=neomutt SMTP: don't interactively authenticate without a password in batch/mailx mode Otherwise, if we don't have a password and curses is not running, the SASL authentication callback will crash mutt. We now abort if the password wasn't given in $smtp_url. --- diff --git a/ChangeLog b/ChangeLog index 102759d07..ab235968e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-05-28 15:20 +0200 Rocco Rutte (84a56dcb0572) + + * doc/mutt.css: Manual: vertical-align table cells at the top + +2009-05-28 15:19 +0200 Rocco Rutte (ee2ebf6cf363) + + * ChangeLog, doc/manual.xml.head, doc/mutt.css: Manual: Wrap muttrc + commands in + 2009-05-27 23:14 -0700 Brendan Cully (5502fb790bab) * mutt_ssl_gnutls.c: gnutls: do not ignore certificate problems. diff --git a/smtp.c b/smtp.c index e6c82f906..0d2620b69 100644 --- a/smtp.c +++ b/smtp.c @@ -422,6 +422,12 @@ 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"));