]> granicus.if.org Git - mutt/commitdiff
The attached patch should be the last feature I want to get in
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 5 Jun 2001 08:11:48 +0000 (08:11 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 5 Jun 2001 08:11:48 +0000 (08:11 +0000)
before 1.4. It creates a new config variable $imap_authenticators,
which is a comma-separated list of authentication methods for mutt
to try to use to authenticate to an IMAP server. If it is
unspecified you get the old behaviour - any method is tried, the
first to succeed or fail ends the auth loop.

globals.h
init.h

index 874b6d8825eac45e80ec3035e243d693cd57f9b5..f8b9a65b1d9d405f5d44e6d8f6957ae91e0bcaec 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -50,6 +50,7 @@ WHERE char *HdrFmt;
 WHERE char *Homedir;
 WHERE char *Hostname;
 #ifdef USE_IMAP
+WHERE char *ImapAuthenticators INITVAL (NULL);
 WHERE char *ImapDelimChars INITVAL (NULL);
 WHERE char *ImapHomeNamespace INITVAL (NULL);
 WHERE char *ImapPass INITVAL (NULL);
diff --git a/init.h b/init.h
index 9300057aafb1ec03fd6974b8c805fbfd1d9239af..88f68f1c01e7f4743542f778a6510f7e42ecf890 100644 (file)
--- a/init.h
+++ b/init.h
@@ -670,6 +670,23 @@ struct option_t MuttVars[] = {
   ** list.
   */
 #ifdef USE_IMAP
+  { "imap_authenticators", DT_STR, R_NONE, UL &ImapAuthenticators, UL 0 },
+  /*
+  ** .pp
+  ** This is a comma-delimited list of authentication methods mutt may
+  ** attempt to use to log in to an IMAP server, in the order mutt should
+  ** try them.  Authentication methods are either 'login' or the right
+  ** side of an IMAP 'AUTH=xxx' capability string, eg 'digest-md5',
+  ** 'gssapi' or 'cram-md5'. This parameter is case-insensitive. If this
+  ** parameter is unset (the default) mutt will try all available methods,
+  ** in order from most-secure to least-secure.
+  ** .pp
+  ** Example: set imap_authenticators="gssapi,cram-md5,login"
+  ** .pp
+  ** \fBNote:\fP Mutt will only fall back to other authentication methods if
+  ** the previous methods are unavailable. If a method is available but
+  ** authentication fails, mutt will not connect to the IMAP server.
+  */
   { "imap_delim_chars",                DT_STR, R_NONE, UL &ImapDelimChars, UL "/." },
   /*
   ** .pp