diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1999-10-04 10:00:16 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1999-10-04 10:00:16 +0000 |
commit | adb589867c4f383061f57333af8379853c75976a (patch) | |
tree | 5d4a8cd75063d7038d86dbd512957b2772d96f3e /imap | |
parent | 90a652416776caecc002132930c113b667cf2315 (diff) |
Some fixes from Brendan Cully.
Diffstat (limited to 'imap')
-rw-r--r-- | imap/BUGS | 23 | ||||
-rw-r--r-- | imap/Makefile.am | 2 | ||||
-rw-r--r-- | imap/README | 27 | ||||
-rw-r--r-- | imap/auth.c | 5 | ||||
-rw-r--r-- | imap/imap.c | 15 | ||||
-rw-r--r-- | imap/util.c | 4 |
6 files changed, 64 insertions, 12 deletions
@@ -1,5 +1,24 @@ In no particular order: +* Mutt doesn't handle timeouts or dropped connections gracefully. You + may see occasional segfaults. Solving this cleanly requires some major + architectural updates. Until that happens, I recommend you keep + backup copies of messages you're composing from within your editor. + +* Sometimes hdr->env seems to be NULL, according to other users' core + files. I haven't been able to reproduce this, and am not sure how + to track it down. But it's very naughty indeed. + +* Rex Walters reports that STORE on folders with lr is attempting to + store null flags instead of skipping the STORE. Strange, there are + checks against exactly this in imap_sync_mailbox. + +* Mutt seems to sometimes handle new messages which arrive in the middle + of downloading old messages incorrectly. It counts too many. + +* Mutt marks your connection for logout as soon as you say quit, even if + you bail out with ^G later. + * Mutt is uninterruptible during socket calls. We should handle SIGINT. * Not really an IMAP bug, but postponed-message checking is done too often, @@ -8,8 +27,6 @@ In no particular order: * Server copy currently doesn't take into account uncommitted changes in messages about to be copied. Sync first. -* Mutt doesn't handle timeouts or dropped connections gracefully. - * Have a hard time when the home namespace isn't default "". * Mutt browses Cyrus IMAP servers poorly, because of Cyrus' feature where @@ -19,4 +36,4 @@ In no particular order: * The mutt_pretty routines don't work well when the delimiter isn't '/'. Brendan Cully <brendan@kublai.com> -Updated 19990911 +Updated 19991001 diff --git a/imap/Makefile.am b/imap/Makefile.am index 85e8b124..11d10a64 100644 --- a/imap/Makefile.am +++ b/imap/Makefile.am @@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = foreign -EXTRA_DIST = BUGS TODO +EXTRA_DIST = BUGS TODO README AM_CPPFLAGS = -I../intl diff --git a/imap/README b/imap/README new file mode 100644 index 00000000..c91c9571 --- /dev/null +++ b/imap/README @@ -0,0 +1,27 @@ +Mutt's IMAP support is still experimental, in that it hasn't been tested on +a wide variety of servers and machines. It may contain memory leaks, dangling +pointers, and other nasty problems. IWFM. YMMV. Caveant emptor lectorque. + +Note in particular that mutt doesn't handle connection timeouts well at all, +and may often crash in their presence. Please keep backups from within your +editor of messages that take a long time to write - the longer you take, +the more likely your connection is to time out, AND the more valuable your +message probably is. + +Please report bugs to mutt-dev@mutt.org and/or brendan@kublai.com. Version, +options, stack-trace and .muttdebug files are a plus. + +New features vs. the stable distribution: + +* Tab-completion of IMAP folder names +* Folder browsing +* Go-fast stripes +* Postponed-message support +* Server-side copy +* Fast sync +* Secure login (GSSAPI and CRAM-MD5) +* More and better segfaults +* Attach messages from IMAP folders +* Use an IMAP path as your Maildir (set folder='') +* Preserve message keywords +* Preserve deleted messages if you don't choose to expunge them diff --git a/imap/auth.c b/imap/auth.c index 571ebca3..a853743b 100644 --- a/imap/auth.c +++ b/imap/auth.c @@ -360,7 +360,10 @@ static int imap_auth_cram_md5 (IMAP_DATA* idata, const char* user, * key is a shared secret and the digested text is the timestamp (including * angle-brackets). * - * (Note: it's unspecified whether the user name needs IMAP quoting.) + * Note: The user name shouldn't be quoted. Since the digest can't contain + * spaces, there is no ambiguity. Some servers get this wrong, we'll work + * around them when the bug report comes in. Until then, we'll remain + * blissfully RFC-compliant. */ hmac_md5 (pass, obuf, hmac_response); dprint (2, (debugfile, "CRAM response: %s,[%s]->", obuf, pass)); diff --git a/imap/imap.c b/imap/imap.c index ddbfb7b8..615d2a9e 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -606,6 +606,7 @@ static int imap_get_delim (IMAP_DATA *idata, CONNECTION *conn) return 0; } +/* get rights for folder, let imap_handle_untagged do the rest */ static int imap_check_acl (IMAP_DATA *idata) { char buf[LONG_STRING]; @@ -618,7 +619,7 @@ static int imap_check_acl (IMAP_DATA *idata) imap_error ("imap_check_acl", buf); return -1; } - return (0); + return 0; } static int imap_check_capabilities (IMAP_DATA *idata) @@ -796,6 +797,9 @@ int imap_open_mailbox (CONTEXT *ctx) idata->selected_ctx = ctx; + /* clear ACL */ + memset (idata->rights, 0, (RIGHTSMAX+7)/8); + mutt_message (_("Selecting %s..."), idata->selected_mailbox); imap_quote_string (buf, sizeof(buf), idata->selected_mailbox); imap_make_sequence (seq, sizeof (seq)); @@ -1104,6 +1108,7 @@ int imap_make_msg_set (char* buf, size_t buflen, CONTEXT* ctx, int flag, int setstart = 0; /* start of current message range */ char* tmp; int n; + short oldsort; /* we clobber reverse, must restore it */ /* sanity-check */ if (!buf || buflen < 2) @@ -1114,8 +1119,12 @@ int imap_make_msg_set (char* buf, size_t buflen, CONTEXT* ctx, int flag, /* make copy of header pointers to sort in natural order */ hdrs = safe_calloc (ctx->msgcount, sizeof (HEADER*)); memcpy (hdrs, ctx->hdrs, ctx->msgcount * sizeof (HEADER*)); + + oldsort = Sort; + Sort = SORT_ORDER; qsort ((void*) hdrs, ctx->msgcount, sizeof (HEADER*), mutt_get_sort_func (SORT_ORDER)); + Sort = oldsort; tmp = safe_malloc (buflen); @@ -1261,10 +1270,6 @@ int imap_sync_mailbox (CONTEXT* ctx, int expunge) * have no ACL rights */ if (*flags && imap_exec (buf, sizeof (buf), CTX_DATA, buf, 0) != 0) { - /* Rex Walters indicates that sometimes an empty flag set - * is still executed. How? */ - dprint(2, (debugfile, "imap_sync_mailbox: flags[0]: [%c] flags: %s", - flags[0], flags)); imap_error ("imap_sync_mailbox: STORE failed", buf); /* give up on this message if we pass here again */ ctx->hdrs[n]->changed = 0; diff --git a/imap/util.c b/imap/util.c index 594d7554..37bcced4 100644 --- a/imap/util.c +++ b/imap/util.c @@ -161,8 +161,8 @@ void imap_qualify_path (char* dest, size_t len, const char* host, int port, NONULL (name)); } -/* imap_quote_string: quote string according to vague IMAP rules. Not - * currently very smart. */ +/* imap_quote_string: quote string according to IMAP rules: + * surround string with quotes, escape " and \ with \ */ void imap_quote_string (char *dest, size_t slen, const char *src) { char quote[] = "\"\\", *pt; |