]> granicus.if.org Git - mutt/commitdiff
patch-bac.flags-20010611.1
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 11 Jun 2001 18:32:03 +0000 (18:32 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 11 Jun 2001 18:32:03 +0000 (18:32 +0000)
doc/manual.sgml.head
imap/auth.c
imap/imap.c

index ccbd6a522eab1c941d76b21b1cb5309babc27eed..e2ea85e700163ebc2791815d9aa72a0540ffc501 100644 (file)
@@ -2150,25 +2150,28 @@ script with the <em/--enable-imap/ flag), it has the ability to work
 with folders located on a remote IMAP server.
 
 You can access the remote inbox by selecting the folder
-<tt/{imapserver}inbox/, where <tt/imapserver/ is the name of the IMAP
-server and <tt/inbox/ is the special name for your spool mailbox on
+<tt>imap://imapserver/INBOX</tt>, where <tt/imapserver/ is the name of the
+IMAP server and <tt/INBOX/ is the special name for your spool mailbox on
 the IMAP server. If you want to access another mail folder at the IMAP
-server, you should use <tt>{imapserver}path/to/folder</tt> where
+server, you should use <tt>imap://imapserver/path/to/folder</tt> where
 <tt>path/to/folder</tt> is the path of the folder you want to access.
 
 You can select an alternative port by specifying it with the server, ie:
-<tt/{imapserver:port}inbox/.
+<tt>imap://imapserver:port/INBOX</tt>.
 
 You can also specify different username for each folder, ie:
-<tt/{username@imapserver[:port]}inbox/.
+<tt>imap://username@imapserver[:port]/INBOX</tt>.
 
 If Mutt was compiled with SSL support (by running the <em/configure/
 script with the <em/--with-ssl/ flag), connections to IMAP servers
 can be encrypted. This naturally requires that the server supports
 SSL encrypted connections. To access a folder with IMAP/SSL, you should
-use <tt>{[username@]imapserver[:port]/ssl}path/to/folder</tt> as your 
+use <tt>imaps://[username@]imapserver[:port]/path/to/folder</tt> as your 
 folder path.
 
+Pine-compatible notation is also supported, ie
+<tt>{[username@]imapserver[:port][/ssl]}path/to/folder</tt>
+
 Note that not all servers use / as the hierarchy separator.  Mutt should
 correctly notice which separator is being used by the server and convert
 paths accordingly.
@@ -2176,7 +2179,8 @@ paths accordingly.
 When browsing folders on an IMAP server, you can toggle whether to look
 at only the folders you are subscribed to, or all folders with the
 <em/toggle-subscribed/ command.  See also the 
-<ref id="imap&lowbar;list&lowbar;subscribed" name="&dollar;imap&lowbar;list&lowbar;subscribed"> variable.
+<ref id="imap&lowbar;list&lowbar;subscribed"
+name="&dollar;imap&lowbar;list&lowbar;subscribed"> variable.
 
 Polling for new mail on an IMAP server can cause noticeable delays. So, you'll
 want to carefully tune the
@@ -2249,6 +2253,11 @@ There are a few variables which control authentication:
 <item><ref id="imap&lowbar;pass" name="&dollar;imap&lowbar;pass"> - a
   password which you may preset, used by all authentication methods where
   a password is needed.
+<item><ref id="imap&lowbar;authenticators"
+  name="&dollar;imap&lowbar;authenticators"> - a colon-delimited list of IMAP
+  authentication methods to try, in the order you wish to try them. If
+  specified, this overrides mutt's default (attempt everything, in the order
+  listed above).
 </itemize>
 
 <sect1>Start a WWW Browser on URLs (EXTERNAL)<label id="urlview">
index 1ce73e35ded49fb31771b6928c73c0dcdb033f9e..9e4c8d02b6f6e756f0365a2cc18736302bd80887 100644 (file)
@@ -48,21 +48,23 @@ int imap_authenticate (IMAP_DATA* idata)
 {
   imap_auth_t* authenticator;
   char* methods;
-  char* comma; /* should be colon  ;-) */
   char* method;
+  char* delim;
   int r = -1;
 
   if (ImapAuthenticators && *ImapAuthenticators)
   {
     /* Try user-specified list of authentication methods */
     methods = safe_strdup (ImapAuthenticators);
-    method = methods;
 
-    while (method)
+    for (method = methods; method; method = delim)
     {
-      comma = strchr (method, ':');
-      if (comma)
-       *comma++ = '\0';
+      delim = strchr (method, ':');
+      if (delim)
+       *delim++ = '\0';
+      if (! method[0])
+       continue;
+      
       dprint (2, (debugfile, "imap_authenticate: Trying method %s\n", method));
       authenticator = imap_authenticators;
 
@@ -79,8 +81,6 @@ int imap_authenticate (IMAP_DATA* idata)
        
        authenticator++;
       }
-
-      method = comma;
     }
 
     FREE (&methods);
index dc208ed4abd870db8ecd5bfbfe4c2d091caa4b25..33aa74958aa940bf1171e3dcc712ca821237adf2 100644 (file)
@@ -912,14 +912,18 @@ int imap_sync_mailbox (CONTEXT* ctx, int expunge, int* index_hint)
       mutt_message (_("Marking %d messages deleted..."), deleted);
       snprintf (tmp, sizeof (tmp), "UID STORE %s +FLAGS.SILENT (\\Deleted)",
         buf);
+      /* mark these messages as unchanged so second pass ignores them. Done
+       * here so BOGUS UW-IMAP 4.7 SILENT FLAGS updates are ignored. */
+      for (n = 0; n < ctx->msgcount; n++)
+       if (ctx->hdrs[n]->deleted && ctx->hdrs[n]->changed)
+         ctx->hdrs[n]->active = 0;
       if (imap_exec (idata, tmp, 0) != 0)
-        /* continue, let regular store try before giving up */
-        dprint(2, (debugfile, "imap_sync_mailbox: fast delete failed\n"));
-      else
-        /* mark these messages as unchanged so second pass ignores them */
-        for (n = 0; n < ctx->msgcount; n++)
-          if (ctx->hdrs[n]->deleted && ctx->hdrs[n]->changed)
-            ctx->hdrs[n]->changed = 0;
+      {
+       mutt_error (_("Expunge failed"));
+       mutt_sleep (1);
+       rc = -1;
+       goto out;
+      }
     }
   }
 
@@ -928,6 +932,8 @@ int imap_sync_mailbox (CONTEXT* ctx, int expunge, int* index_hint)
   {
     if (ctx->hdrs[n]->changed)
     {
+      ctx->hdrs[n]->changed = 0;
+
       mutt_message (_("Saving message status flags... [%d/%d]"), n+1,
         ctx->msgcount);
 
@@ -980,6 +986,9 @@ int imap_sync_mailbox (CONTEXT* ctx, int expunge, int* index_hint)
         snprintf (buf, sizeof (buf), "UID STORE %d FLAGS.SILENT (%s)",
           HEADER_DATA (ctx->hdrs[n])->uid, flags);
 
+      /* dumb hack for bad UW-IMAP 4.7 servers spurious FLAGS updates */
+      ctx->hdrs[n]->active = 0;
+
       /* after all this it's still possible to have no flags, if you
        * have no ACL rights */
       if (*flags && (imap_exec (idata, buf, 0) != 0) &&
@@ -994,7 +1003,7 @@ int imap_sync_mailbox (CONTEXT* ctx, int expunge, int* index_hint)
        }
       }
 
-      ctx->hdrs[n]->changed = 0;
+      ctx->hdrs[n]->active = 1;
     }
   }
   ctx->changed = 0;