Commit f72a8fa8 authored by Thomas Roessler's avatar Thomas Roessler

Add $imap_servernoise option to suppress IMAP server messages. From

Brendan Cully.
parent 8170c3f4
......@@ -44,7 +44,7 @@ The most basic rule is this one:
Don't quote them with single or double quotes. Mutt does this for
you, the right way, as should any other program which interprets
mailcap. Don't put them into backtick expansions - as you have seen
above, this is a recipe for desaster. Be highly careful with eval
above, this is a recipe for disaster. Be highly careful with eval
statements, and avoid them if possible at all.
If you have to use the %-expandos' values in context where you need
......
......@@ -492,18 +492,22 @@ AC_ARG_WITH(ssl, [ --with-ssl[=PFX] Compile in SSL socket support for
AC_MSG_ERROR([SSL support is only for IMAP, but IMAP is not enabled])
fi
if test "x$withval" != "x"; then
if test "$with_ssl" != "no"
then
if test "$with_ssl" != "yes"
then
LDFLAGS="$LDFLAGS -L$withval/lib"
CPPFLAGS="$CPPFLAGS -I$withval/include"
fi
saved_LIBS="$LIBS"
AC_CHECK_LIB(crypto, X509_new,, AC_MSG_ERROR([Unable to find SSL library]))
AC_CHECK_LIB(ssl, SSL_new,, AC_MSG_ERROR([Unable to find SSL library]), -lcrypto)
AC_DEFINE(USE_SSL)
LIBS="$saved_LIBS"
MUTTLIBS="$MUTTLIBS -lssl -lcrypto"
need_ssl=yes
fi
saved_LIBS="$LIBS"
AC_CHECK_LIB(crypto, X509_new,, AC_MSG_ERROR([Unable to find SSL library]))
AC_CHECK_LIB(ssl, SSL_new,, AC_MSG_ERROR([Unable to find SSL library]), -lcrypto)
AC_DEFINE(USE_SSL)
LIBS="$saved_LIBS"
MUTTLIBS="$MUTTLIBS -lssl -lcrypto"
need_ssl=yes
])
AM_CONDITIONAL(USE_SSL, test x$need_ssl = xyes)
......
......@@ -259,7 +259,7 @@ int imap_handle_untagged (IMAP_DATA *idata, char *s)
mx_fastclose_mailbox (idata->selected_ctx);
return (-1);
}
else if (mutt_strncasecmp ("NO", s, 2) == 0)
else if (option (OPTIMAPSERVERNOISE) && (mutt_strncasecmp ("NO", s, 2) == 0))
{
/* Display the warning message from the server */
mutt_error (s+3);
......
......@@ -675,6 +675,15 @@ struct option_t MuttVars[] = {
** user/password pairs on mutt invocation, or if opening the connection
** is slow.
*/
{ "imap_servernoise", DT_BOOL, R_NONE, OPTIMAPSERVERNOISE, 1 },
/*
** .pp
** When set, mutt will display warning messages from the IMAP
** server as error messages. Since these messages are often
** harmless, or generated due to configuration problems on the
** server which are out of the users' hands, you may wish to suppress
** them at some point.
*/
{ "imap_home_namespace", DT_STR, R_NONE, UL &ImapHomeNamespace, UL 0},
/*
** .pp
......
......@@ -300,6 +300,7 @@ enum
#ifdef USE_IMAP
OPTIMAPLSUB,
OPTIMAPPASSIVE,
OPTIMAPSERVERNOISE,
#endif
#ifdef USE_SSL
OPTSSLV2,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment