Re: Problem getting headers of an IMAP account



On Wed, 2006-11-08 at 17:13 +0100, Sergio Villar Senin wrote:
> Philip Van Hoof wrote:
> 
> >> Looking deeper into the code it seems that in
> >> camel_imap_command_response I'm getting the following response from the
> >> imap server:
> >>
> >> A00012 BAD Invalid field-name in UID Fetch BODY.PEEK[HEADER.FIELDS
> > 
> >> Any clue?
> > 
> > Yes. This is new code from me apparently doing something that doesn't
> > work with your IMAP server.
> > 
> > Ehm, a few questions: what IMAP server are you using? Can you give me
> > access to a test account on it? Do you have the remainder of the error
> > message coming from the server (it's only a part of it), I need the
> > actual field-name that was invalid?
> 
> Actually I tested it with two servers, the first one is a Cyrus 1.5.19,
> and about the second one I have no clue.
> 
> Regarding the test account, I'm sorry but I can't, it's my ISP IMAP
> server, and the other one is from my company.
> 
> Regarding messages that come from the server I got the following:


This piece of code in the file camel-imap-folder.c defines the command
that is being sent and that is invalid for your IMAP service.

#define CAMEL_MESSAGE_INFO_HEADERS "DATE FROM TO CC SUBJECT IN-REPLY-TO
MESSAGE-ID MIME-VERSION CONTENT-TYPE "

if (store->server_level >= IMAP_LEVEL_IMAP4REV1)
   	header_spec = "HEADER.FIELDS (" CAMEL_MESSAGE_INFO_HEADERS ")";
   else
   	header_spec = "0";

 if( g_getenv ("TNY_IMAP_FETCH_ALL_HEADERS") )
   	header_spec = "HEADER";

Can you try with export TNY_IMAP_FETCH_ALL_HEADERS=1 ?


camel-imap-store.c does this:

static void
imap_set_server_level (CamelImapStore *store)
{
	if (store->capabilities & IMAP_CAPABILITY_IMAP4REV1) {
		store->server_level = IMAP_LEVEL_IMAP4REV1;
		store->capabilities |= IMAP_CAPABILITY_STATUS;
	} else if (store->capabilities & IMAP_CAPABILITY_IMAP4)
		store->server_level = IMAP_LEVEL_IMAP4;
	else
		store->server_level = IMAP_LEVEL_UNKNOWN;
}


> --> SELECT INBOX
> <-- * 9 EXISTS
> <-- * 0 RECENT
> <-- * FLAGS (\Answered \Flagged \Deleted \Seen \Draft $MDNSent)
> <-- * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft
> $MDNSent)] flags can be changed
> <-- * OK [UIDVALIDITY 1118392759] mailbox UID validity
> <-- * OK [UIDNEXT 74] predicted next UID
> <-- A00005 OK [READ-WRITE] SELECT complete
> --> UID FETCH 1:2 (FLAGS)
> <-- A00006 OK FETCH complete
> --> UID FETCH 1:* (FLAGS)
> <-- * 1 FETCH (FLAGS (\Seen) UID 65)
> <-- * 2 FETCH (FLAGS (\Seen) UID 66)
> <-- * 3 FETCH (FLAGS (\Seen) UID 67)
> <-- * 4 FETCH (FLAGS (\Seen) UID 68)
> <-- * 5 FETCH (FLAGS (\Deleted \Seen) UID 69)
> <-- * 6 FETCH (FLAGS (\Deleted \Seen) UID 70)
> <-- * 7 FETCH (FLAGS (\Seen) UID 71)
> <-- * 8 FETCH (FLAGS (\Seen) UID 72)
> <-- * 9 FETCH (FLAGS (\Deleted \Seen) UID 73)
> <-- A00007 OK FETCH complete
> --> UID FETCH 65:73 (FLAGS INTERNALDATE BODY.PEEK[HEADER.FIELDS (DATE
> FROM TO CC SUBJECT IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE )])
> <-- A00008 BAD invalid FETCH command syntax, invalid attribute list syntax
> 
> (lt-tinymail:21328): camel-imap-provider-WARNING **: Problem while
> receiving headers from MMAP (I didn't receive enough headers 0 vs 9)
> 
> Br.
> 
> _______________________________________________
> tinymail-devel-list mailing list
> tinymail-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/tinymail-devel-list
-- 
Philip Van Hoof, software developer at x-tend 
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
work: vanhoof at x-tend dot be 
http://www.pvanhoof.be - http://www.x-tend.be




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]