<<< Date Index >>>     <<< Thread Index >>>

Re: Problems with IMAP



It appears that fetching the headers from the server failed for some
reason (NO is returned). So I applied this patch to debug the problem:

--- orig/mutt-1.5.20/imap/message.c     2009-06-07 20:52:57.000000000 +0300
+++ mutt-1.5.20/imap/message.c  2009-08-19 00:26:37.000000000 +0300
@@ -80,6 +80,7 @@
   unsigned int uidnext = 0;
   int evalhc = 0;
 #endif /* USE_HCACHE */
+  int prevsid = msgbegin;

   ctx = idata->ctx;

@@ -269,6 +270,11 @@
       else if (mfhrc < 0)
        break;

+        if(prevsid+1 != h.sid) {
+           dprint (2, (debugfile, "BUGBUG expecting %d got %d\n",
prevsid+1, h.sid));
+        }
+        prevsid = h.sid;
+
       if (!ftello (fp))
       {
         dprint (2, (debugfile, "msg_fetch_header: ignoring fetch
response with no body\n"));

and indeed i see prints like:
...
BUGBUG expecting 50880 got 50881
BUGBUG expecting 51939 got 51940
BUGBUG expecting 66696 got 66697
BUGBUG expecting 68457 got 68458
BUGBUG expecting 68911 got 68912
...

It appears that the imap server skips some headers in the FETCH
command. Is this normal? Is this whats casuing the error? What can i
do?

On Tue, Aug 18, 2009 at 14:35, Aviv Greenberg<avivgnet@xxxxxxxxx> wrote:
> I'm using IMAP to get my email from my gmail mailbox using mutt
> 1.5.20. It used to work before but now i get "Error opening mailbox"
> after all the headers are fetched, and nothing happens (no emails are
> displayed).
>
> I enabled debug messages (-d 3) - and found this:
> ...
> parse_parameters: `charset=utf-8'
> parse_parameter: `charset' = `utf-8'
> 4< a0006 NO Some messages could not be FETCHed (Failure)
> IMAP queue drained
> Error opening mailbox
> 4> a0007 STATUS "INBOX" (UIDNEXT UIDVALIDITY UNSEEN RECENT)^M
>
>                                                       4< * STATUS
> "INBOX" (RECENT 0 UIDNEXT 305080 UIDVALIDITY 2 UNSEEN 220847)
> INBOX (UIDVALIDITY: 2, UIDNEXT: 305080) 0 messages, 0 recent, 220847 unseen
> Running default STATUS handler
> Found INBOX in buffy list (OV: 2 ON: 305058 U: 220847)
> 4< a0007 OK Success
> IMAP queue drained
> ...
>
> What is happening?
>
>
> My mutt -v output is:
> Mutt 1.5.20 (2009-06-14)
> ...
> System: Linux 2.6.25.20-0.4-pae (i686)
> ncurses: ncurses 5.6.20070128 (compiled with 5.6)
> libidn: 1.8 (compiled with 1.8)
> hcache backend: GDBM version 1.8.3. 10/15/2002 (built Jun  6 2008 19:43:19)
> Compile options:
> -DOMAIN
> +DEBUG
> -HOMESPOOL  -USE_SETGID  +USE_DOTLOCK  -DL_STANDALONE  +USE_FCNTL  -USE_FLOCK
> +USE_POP  +USE_IMAP  +USE_SMTP
> +USE_SSL_OPENSSL  -USE_SSL_GNUTLS  +USE_SASL  +USE_GSS  +HAVE_GETADDRINFO
> +HAVE_REGCOMP  -USE_GNU_REGEX
> +HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET
> +HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM
> +CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME  +CRYPT_BACKEND_GPGME
> -EXACT_ADDRESS  -SUN_ATTACHMENT
> +ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET
> +HAVE_LANGINFO_YESEXPR
> +HAVE_ICONV  -ICONV_NONTRANS  +HAVE_LIBIDN  +HAVE_GETSID  +USE_HCACHE
> ISPELL="/usr/bin/ispell"
> SENDMAIL="/usr/sbin/sendmail"
> MAILPATH="/var/mail"
> PKGDATADIR="/usr/local/share/mutt"
> SYSCONFDIR="/usr/local/etc"
> EXECSHELL="/bin/sh"
> -MIXMASTER
>



-- 

Ted Turner  - "Sports is like a war without the killing." -
http://www.brainyquote.com/quotes/authors/t/ted_turner.html