]> granicus.if.org Git - neomutt/commitdiff
Add $imap_servernoise option to suppress IMAP server messages. From
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 1 Mar 2000 00:12:09 +0000 (00:12 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 1 Mar 2000 00:12:09 +0000 (00:12 +0000)
Brendan Cully.

README.SECURITY
configure.in
imap/command.c
init.h
mutt.h

index 40b8f60aceea943af745f4ddcffd8b31022ea82d..9061632853b6cb60af64135cb671b341e4b14459 100644 (file)
@@ -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
index 97604998fc58e5e9650b34a74f0756fb231ed74c..ccbeb600f4188b37d821248a2de3460f8d173ff8 100644 (file)
@@ -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)
 
index 3fab7abe7557e999f59cd6d7c497823faf33a75a..6ba52fb7c6c6c81a0ad301b1bcf4adae51099d1a 100644 (file)
@@ -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);
diff --git a/init.h b/init.h
index a015f7f04d43bb1a774517fed9c6c19ca55c3b02..afc4ed1633224aafb3c3eb990761fda858c34310 100644 (file)
--- a/init.h
+++ b/init.h
@@ -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
diff --git a/mutt.h b/mutt.h
index c04a7452b1b710de60dc881766a403bbcef704c8..72171b85dbacc04492e0578043bcf53d61072204 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -300,6 +300,7 @@ enum
 #ifdef USE_IMAP
   OPTIMAPLSUB,
   OPTIMAPPASSIVE,
+  OPTIMAPSERVERNOISE,
 #endif
 #ifdef USE_SSL
   OPTSSLV2,