MBOX-Line: From David.Harris at pmail.gen.nz  Tue Apr  3 19:48:56 2012
To: imap-protocol@u.washington.edu
From: David Harris <David.Harris@pmail.gen.nz>
Date: Fri Jun  8 12:34:48 2018
Subject: [Imap-protocol] Question about FETCH command
In-Reply-To: <4F7BABE4.3050503@earthlink.net>
References: <1328732126.32086.140661033971485@webmail.messagingengine.com>,
	<558673177.37525.1333503846416.JavaMail.root@zimbra.com>,
	<4F7BABE4.3050503@earthlink.net>
Message-ID: <4F7BB698.28289.3F46BCE4@David.Harris.pmail.gen.nz>

On 3 Apr 2012 at 21:03, Rick Sanders wrote:

> > (Note that this is a correct response if there are no messages
> > in the mailbox.)
> 
> Good point.  I should have mentioned that this happens even when there 
> are messages in the mailbox:
> 
> 1 select Big.Box
> * 5 EXISTS
> * 0 RECENT
> * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
> * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft 
> $MDNSent)] Permanent flags
> * OK [UIDVALIDITY 17873] UIDVALIDITY value
> * OK [UIDNEXT 9] The next unique identifier value
> 1 OK [READ-WRITE] SELECT completed.
> 1 fetch 1 (BODY[HEADER (DATE)])
> 1 BAD Command Argument Error. 11

Shouldn't that command be 

   1 fetch 1 (BODY[HEADER.FIELDS (DATE)])

?

Since your earlier message appears to show the ".FIELDS" syntax, I 
assume this is merely a typo, but thought I'd mention it just in case.

Another thing... You're reusing the same command ID on each 
command. Now IIRC, this isn't illegal per se, but I'd try using different 
command IDs just to make sure that it's not part of the problem. Based 
on past experience with some older servers, I'd also try using a mix of 
alphabetics and digits in your command ID (I recall at least one server 
many years ago that got confused on numeric-only command IDs).

Cheers!

-- David --

------------------ David Harris -+- Pegasus Mail ----------------------
Box 5451, Dunedin, New Zealand | e-mail: David.Harris@pmail.gen.nz
           Phone: +64 3 453-6880 | Fax: +64 3 453-6612

Schoolboy howler for the day:
   "A census taker is the man who goes from home to home
    increasing the population."



