mailing list archives

meli community discussions

⚠️ if something does not work as intended when interracting with the mailing lists,
reach out Github mirror Gitea repo @epilys:matrix.org

E-mail headers
From: Davide Gullo <jazzo72@gmail.com>
To: imap-protocol@u.washington.edu
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: CANVPb6vp-KDjeUQBkgz9d74p-2aEg3Pvam+vZqrx_o1HhS2dWw@mail.gmail.com permalink / raw / eml / mbox
Hi,
I got a very strange behavior on an account on Gmail.
A lot of them have the size wrong, look at the attached log (especially the
bold lines).
Then the parser obviously return an error.


29.07.14 17:07 >>> 5 UID FETCH 7848:7853 (UID X-GM-MSGID FLAGS RFC822.SIZE
ENVELOPE BODY.PEEK[HEADER.FIELDS (References)] BODYSTRUCTURE RFC822)
29.07.14 17:07 >>> >>>>>>> end send >>>>>>
29.07.14 17:07 <<< <<<<<<< read <<<<<<
*29.07.14 17:07 <<< * 1 FETCH (X-GM-MSGID 1345148067064026772 UID 7848
RFC822.SIZE 1372 BODY[HEADER.FIELDS (References)] {2}*
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
....
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<< )
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
*29.07.14 17:07 <<< * 2 FETCH (X-GM-MSGID 1345153544278287346 UID 7853
RFC822.SIZE 5433 BODY[HEADER.FIELDS (References)] {151}*
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
......
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<< )
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<< 5 OK Success



-- 
Davide Gullo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20140729/80aa7424/attachment.html>
Reply
E-mail headers
From: blong@google.com
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: CABa8R6uQw+NafV=KtZFW3X3g_cJfpPb0zNp2y4B4cAYZfXJXjQ@mail.gmail.com permalink / raw / eml / mbox
Which size is wrong?  The literal?  Or the RFC822.SIZE?  And you know its
wrong based on what other information?

We're going to need more information to understand the issue.

Brandon


On Tue, Jul 29, 2014 at 1:26 PM, Davide Gullo <jazzo72@gmail.com> wrote:

> Hi,
> I got a very strange behavior on an account on Gmail.
> A lot of them have the size wrong, look at the attached log (especially
> the bold lines).
> Then the parser obviously return an error.
>
>
> 29.07.14 17:07 >>> 5 UID FETCH 7848:7853 (UID X-GM-MSGID FLAGS RFC822.SIZE
> ENVELOPE BODY.PEEK[HEADER.FIELDS (References)] BODYSTRUCTURE RFC822)
> 29.07.14 17:07 >>> >>>>>>> end send >>>>>>
> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> *29.07.14 17:07 <<< * 1 FETCH (X-GM-MSGID 1345148067064026772 UID 7848
> RFC822.SIZE 1372 BODY[HEADER.FIELDS (References)] {2}*
> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> ....
> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> 29.07.14 17:07 <<< )
> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> *29.07.14 17:07 <<< * 2 FETCH (X-GM-MSGID 1345153544278287346 UID 7853
> RFC822.SIZE 5433 BODY[HEADER.FIELDS (References)] {151}*
> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> ......
> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> 29.07.14 17:07 <<< )
> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> 29.07.14 17:07 <<< 5 OK Success
>
>
>
> --
> Davide Gullo
>
> _______________________________________________
> Imap-protocol mailing list
> Imap-protocol@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20140729/738d6970/attachment.html>
Reply
E-mail headers
From: jazzo72@gmail.com
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: CANVPb6tjjRyxKK+7NDpFqeqSwN68OxLAie=WOPoFZyTs1WcEWQ@mail.gmail.com permalink / raw / eml / mbox
The literal is wrong, I don't know if the RFC822.SIZE too.
Brandon, I can give you the account if you want.




2014-07-29 23:28 GMT+02:00 Brandon Long <blong@google.com>:

> Which size is wrong?  The literal?  Or the RFC822.SIZE?  And you know its
> wrong based on what other information?
>
> We're going to need more information to understand the issue.
>
> Brandon
>
>
> On Tue, Jul 29, 2014 at 1:26 PM, Davide Gullo <jazzo72@gmail.com> wrote:
>
>> Hi,
>> I got a very strange behavior on an account on Gmail.
>> A lot of them have the size wrong, look at the attached log (especially
>> the bold lines).
>> Then the parser obviously return an error.
>>
>>
>> 29.07.14 17:07 >>> 5 UID FETCH 7848:7853 (UID X-GM-MSGID FLAGS
>> RFC822.SIZE ENVELOPE BODY.PEEK[HEADER.FIELDS (References)] BODYSTRUCTURE
>> RFC822)
>> 29.07.14 17:07 >>> >>>>>>> end send >>>>>>
>> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
>> *29.07.14 17:07 <<< * 1 FETCH (X-GM-MSGID 1345148067064026772 UID 7848
>> RFC822.SIZE 1372 BODY[HEADER.FIELDS (References)] {2}*
>> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
>> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
>> ....
>> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
>> 29.07.14 17:07 <<< )
>> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
>> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
>> *29.07.14 17:07 <<< * 2 FETCH (X-GM-MSGID 1345153544278287346 UID 7853
>> RFC822.SIZE 5433 BODY[HEADER.FIELDS (References)] {151}*
>> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
>> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
>> ......
>> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
>> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
>> 29.07.14 17:07 <<< )
>> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
>> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
>> 29.07.14 17:07 <<< 5 OK Success
>>
>>
>>
>> --
>> Davide Gullo
>>
>> _______________________________________________
>> Imap-protocol mailing list
>> Imap-protocol@u.washington.edu
>> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>>
>
>


-- 
Davide Gullo, Consulente Web (professionista disciplinato ai sensi della
legge 4/2013)
http://www.m4ss.net
gullo@m4ss.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20140730/7e599104/attachment.html>
Reply
E-mail headers
From: slusarz@curecanti.org
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: 20140729163645.Horde.h5gjOOLwGbpVI_dHXPMKnQ6@bigworm.curecanti.org permalink / raw / eml / mbox
Quoting Davide Gullo <jazzo72@gmail.com>:

> The literal is wrong, I don't know if the RFC822.SIZE too.
> Brandon, I can give you the account if you want.

Why is the literal wrong?  The References header might not match in  
that message.  In which case the literal length will correctly be 2  
(for the CRLF header delimiter).

[snip]

>>> 29.07.14 17:07 >>> 5 UID FETCH 7848:7853 (UID X-GM-MSGID FLAGS
>>> RFC822.SIZE ENVELOPE BODY.PEEK[HEADER.FIELDS (References)] BODYSTRUCTURE
>>> RFC822)
>>> 29.07.14 17:07 >>> >>>>>>> end send >>>>>>
>>> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
>>> *29.07.14 17:07 <<< * 1 FETCH (X-GM-MSGID 1345148067064026772 UID 7848
>>> RFC822.SIZE 1372 BODY[HEADER.FIELDS (References)] {2}*
>>> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
>>> 29.07.14 17:07 <<< <<<<<<< read <<<<<<

michael
Reply
E-mail headers
From: dinh.viet.hoa@gmail.com
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: EBBF558390C949C08A544E0D7555F7B1@gmail.com permalink / raw / eml / mbox
Davide,
you should probably show explicitly the content it?s sending and why it doesn?t match the size of the literal.

--  
Hoa V. Dinh


On Tuesday, July 29, 2014 at 3:36 PM, Michael M Slusarz wrote:

> Quoting Davide Gullo <jazzo72@gmail.com (mailto:jazzo72@gmail.com)>:
>  
> > The literal is wrong, I don't know if the RFC822.SIZE too.
> > Brandon, I can give you the account if you want.
> >  
>  
>  
> Why is the literal wrong? The References header might not match in  
> that message. In which case the literal length will correctly be 2  
> (for the CRLF header delimiter).
>  
> [snip]
>  
> > > > 29.07.14 17:07 >>> 5 UID FETCH 7848:7853 (UID X-GM-MSGID FLAGS
> > > > RFC822.SIZE ENVELOPE BODY.PEEK[HEADER.FIELDS (References)] BODYSTRUCTURE
> > > > RFC822)
> > > > 29.07.14 17:07 >>> >>>>>>> end send >>>>>>
> > > > 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> > > > *29.07.14 17:07 <<< * 1 FETCH (X-GM-MSGID 1345148067064026772 UID 7848
> > > > RFC822.SIZE 1372 BODY[HEADER.FIELDS (References)] {2}*
> > > > 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
> > > > 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> > > >  
> > >  
> >  
>  
>  
> michael
>  
> _______________________________________________
> Imap-protocol mailing list
> Imap-protocol@u.washington.edu (mailto:Imap-protocol@u.washington.edu)
> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20140729/bf772fa3/attachment.html>
Reply
E-mail headers
From: gullo@m4ss.net
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: CANVPb6vn6nL_4jmafo3OFjKY3ev+f1z3rB40RiHK_OXs7f2oiA@mail.gmail.com permalink / raw / eml / mbox
This is the complete transaction.
As you can see the Gmail Imap server does not send any contents:

29.07.14 17:07 >>> >>>>>>> send >>>>>>
29.07.14 17:07 >>> 5 UID FETCH 7848:7853 (UID X-GM-MSGID FLAGS RFC822.SIZE
ENVELOPE BODY.PEEK[HEADER.FIELDS (References)] BODYSTRUCTURE RFC822)
29.07.14 17:07 >>> >>>>>>> end send >>>>>>
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<< * 1 FETCH (X-GM-MSGID 1345148067064026772 UID 7848
RFC822.SIZE 1372 BODY[HEADER.FIELDS (References)] {2}
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<<  FLAGS (\Seen) ENVELOPE ("Thu, 26 Aug 2010 16:32:43
+0200" "Transfer of Licence" (("Marcus Breiden" NIL "marcus" "edu-magic.net"))
((NIL NIL "marcus" "breiden.net")) (("Marcus Breiden" NIL "marcus" "
edu-magic.net")) ((NIL NIL "sales" "activewords.com")) NIL NIL NIL "<
AANLkTim1oYW+6YcmJkJb7dWDqF6d36wBUTjEjtJC1+wr@mail.gmail.com>")
BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1") NIL NIL "7BIT" 243
9 NIL NIL NIL)("TEXT" "HTML" ("CHARSET" "ISO-8859-1") NIL NIL "7BIT" 395 2
NIL NIL NIL) "ALTERNATIVE" ("BOUNDARY" "000325573a4605caab048ebadf78") NIL
NIL) BODY[HEADER.FIELDS (References)] {2}
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<< )
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<< * 2 FETCH (X-GM-MSGID 1345153544278287346 UID 7853
RFC822.SIZE 5433 BODY[HEADER.FIELDS (References)] {151}
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<< References: <
AANLkTim1oYW+6YcmJkJb7dWDqF6d36wBUTjEjtJC1+wr@mail.gmail.com>
 <52AA1094A13E1B4389FE071EFAFD69D42B1C3FEA7A@mbx1.hostedexchange.local>
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<<  FLAGS (\Seen) ENVELOPE ("Thu, 26 Aug 2010 17:59:46
+0200" "Re: Transfer of Licence" (("Marcus Breiden" NIL "marcus" "
edu-magic.net")) ((NIL NIL "marcus" "breiden.net")) (("Marcus Breiden" NIL
"marcus" "edu-magic.net")) (("ActiveWords Support" NIL "support" "
activewords.com")) NIL NIL "<
52AA1094A13E1B4389FE071EFAFD69D42B1C3FEA7A@mbx1.hostedexchange.local>" "<
AANLkTin+c+NkCma81D0F6uksqCTJrC5ZJ4Hr5qTJJ8ue@mail.gmail.com>")
BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "ISO-8859-1") NIL NIL "7BIT" 997
53 NIL NIL NIL)("TEXT" "HTML" ("CHARSET" "ISO-8859-1") NIL NIL
"QUOTED-PRINTABLE" 3395 125 NIL NIL NIL) "ALTERNATIVE" ("BOUNDARY"
"001636c59a685986fc048ebc165f") NIL NIL) BODY[HEADER.FIELDS (References)]
{151}
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<< References: <
AANLkTim1oYW+6YcmJkJb7dWDqF6d36wBUTjEjtJC1+wr@mail.gmail.com>
 <52AA1094A13E1B4389FE071EFAFD69D42B1C3FEA7A@mbx1.hostedexchange.local>
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<< )
29.07.14 17:07 <<< <<<<<<< end read <<<<<<
29.07.14 17:07 <<< <<<<<<< read <<<<<<
29.07.14 17:07 <<< 5 OK Success


2014-07-30 0:38 GMT+02:00 Hoa V. Dinh <dinh.viet.hoa@gmail.com>:

>  Davide,
> you should probably show explicitly the content it?s sending and why it
> doesn?t match the size of the literal.
>
> --
> Hoa V. Dinh
>
> On Tuesday, July 29, 2014 at 3:36 PM, Michael M Slusarz wrote:
>
> Quoting Davide Gullo <jazzo72@gmail.com>:
>
> The literal is wrong, I don't know if the RFC822.SIZE too.
> Brandon, I can give you the account if you want.
>
>
> Why is the literal wrong? The References header might not match in
> that message. In which case the literal length will correctly be 2
> (for the CRLF header delimiter).
>
> [snip]
>
> 29.07.14 17:07 >>> 5 UID FETCH 7848:7853 (UID X-GM-MSGID FLAGS
> RFC822.SIZE ENVELOPE BODY.PEEK[HEADER.FIELDS (References)] BODYSTRUCTURE
> RFC822)
> 29.07.14 17:07 >>> >>>>>>> end send >>>>>>
> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> *29.07.14 17:07 <<< * 1 FETCH (X-GM-MSGID 1345148067064026772 UID 7848
> RFC822.SIZE 1372 BODY[HEADER.FIELDS (References)] {2}*
> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
>
>
> michael
>
> _______________________________________________
> Imap-protocol mailing list
> Imap-protocol@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>
>
>
> _______________________________________________
> Imap-protocol mailing list
> Imap-protocol@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>



-- 
Davide Gullo, Consulente Web (professionista disciplinato ai sensi della
legge 4/2013)
http://www.m4ss.net
gullo@m4ss.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20140730/0b37c177/attachment.html>
Reply
E-mail headers
From: jkt@flaska.net
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: 42e6254c-76ec-4d2e-8f95-5dc407db8eea@flaska.net permalink / raw / eml / mbox
On Wednesday, 30 July 2014 15:20:06 CEST, Davide Gullo wrote:
> 29.07.14 17:07 >>> >>>>>>> send >>>>>>
> 29.07.14 17:07 >>> 5 UID FETCH 7848:7853 (UID X-GM-MSGID FLAGS RFC822.SIZE
> ENVELOPE BODY.PEEK[HEADER.FIELDS (References)] BODYSTRUCTURE RFC822)
> 29.07.14 17:07 >>> >>>>>>> end send >>>>>>
> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> 29.07.14 17:07 <<< * 1 FETCH (X-GM-MSGID 1345148067064026772 UID 7848
> RFC822.SIZE 1372 BODY[HEADER.FIELDS (References)] {2}
> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
> 29.07.14 17:07 <<< <<<<<<< read <<<<<<

I don't see any problem in this log. Chances are that your client's IMAP 
parser does not properly support literals. Please note that the server says 
that the "BODY[HEADER.FIELDS (References)]" item which you are fetching 
contains exactly two bytes, the CR followed by LF. In C-syntax, that would 
be "\r\n".

So this is how the data sent by the server look like on the wire (again, 
using the C-style escaping of non-printable character):

BODY[HEADER.FIELDS (References)] {2}\r\n\r\n)\r\n

Let's break it down:

1) "BODY[HEADER.FIELDS (References)]" -- that's an identification what 
you're about to read.

2) SP (a space, " ") -- delimiter, as defined by the FETCH response format

3) "{2}\r\n" -- this means that a LITERAL follows. The overal size of the 
literal is two bytes. You *must* stop reading in a line-oriented manner 
right now, and switch to reading the exact number of bytes which the server 
tells you -- two bytes in this case.

4) "\r\n", i.e. CR LF -- actual header data. The header is missing, so the 
server sends just the CR LF which is the separator between the header and 
the body of a MIME message.

5) ")" -- consitutes the end of the FETCH response data

6) CR LF -- end of the line, end of the response

Let's see it in action:

> BODY[HEADER.FIELDS (References)] {2}
> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<

...at this point you know it's a literal. You should switch from 
read-until-end-of-line mode into reading-number-of-binary-bytes mode right 
now, and read two bytes in that mode.

> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<

Your code silently ignores CR LF line ends. You have a bug right here.

OK, you've read two bytes, you should switch to the standard mode of 
reading until EOL:

> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
> 29.07.14 17:07 <<< )
> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<

Right, end of response, everything is OK.

Cheers,
Jan

-- 
Trojit?, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
Reply
E-mail headers
From: gullo@m4ss.net
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: CANVPb6ta9pVnE6g8f9CDTDDLV+56ByerB9d--+J5AObBRbOpUA@mail.gmail.com permalink / raw / eml / mbox
Ok Jan, I understand what you mean but the problem comes from the missed
RFC822.
The server does not send it, why?


2014-07-30 15:50 GMT+02:00 Jan Kundr?t <jkt@flaska.net>:

> On Wednesday, 30 July 2014 15:20:06 CEST, Davide Gullo wrote:
>
>> 29.07.14 17:07 >>> >>>>>>> send >>>>>>
>> 29.07.14 17:07 >>> 5 UID FETCH 7848:7853 (UID X-GM-MSGID FLAGS RFC822.SIZE
>> ENVELOPE BODY.PEEK[HEADER.FIELDS (References)] BODYSTRUCTURE RFC822)
>> 29.07.14 17:07 >>> >>>>>>> end send >>>>>>
>> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
>> 29.07.14 17:07 <<< * 1 FETCH (X-GM-MSGID 1345148067064026772 UID 7848
>> RFC822.SIZE 1372 BODY[HEADER.FIELDS (References)] {2}
>> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
>> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
>> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
>> 29.07.14 17:07 <<< <<<<<<< read <<<<<<
>>
>
> I don't see any problem in this log. Chances are that your client's IMAP
> parser does not properly support literals. Please note that the server says
> that the "BODY[HEADER.FIELDS (References)]" item which you are fetching
> contains exactly two bytes, the CR followed by LF. In C-syntax, that would
> be "\r\n".
>
> So this is how the data sent by the server look like on the wire (again,
> using the C-style escaping of non-printable character):
>
> BODY[HEADER.FIELDS (References)] {2}\r\n\r\n)\r\n
>
> Let's break it down:
>
> 1) "BODY[HEADER.FIELDS (References)]" -- that's an identification what
> you're about to read.
>
> 2) SP (a space, " ") -- delimiter, as defined by the FETCH response format
>
> 3) "{2}\r\n" -- this means that a LITERAL follows. The overal size of the
> literal is two bytes. You *must* stop reading in a line-oriented manner
> right now, and switch to reading the exact number of bytes which the server
> tells you -- two bytes in this case.
>
> 4) "\r\n", i.e. CR LF -- actual header data. The header is missing, so the
> server sends just the CR LF which is the separator between the header and
> the body of a MIME message.
>
> 5) ")" -- consitutes the end of the FETCH response data
>
> 6) CR LF -- end of the line, end of the response
>
> Let's see it in action:
>
>
>  BODY[HEADER.FIELDS (References)] {2}
>> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
>>
>
> ...at this point you know it's a literal. You should switch from
> read-until-end-of-line mode into reading-number-of-binary-bytes mode right
> now, and read two bytes in that mode.
>
>
>  29.07.14 17:07 <<< <<<<<<< read <<<<<<
>> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
>>
>
> Your code silently ignores CR LF line ends. You have a bug right here.
>
> OK, you've read two bytes, you should switch to the standard mode of
> reading until EOL:
>
>
>  29.07.14 17:07 <<< <<<<<<< read <<<<<<
>> 29.07.14 17:07 <<< )
>> 29.07.14 17:07 <<< <<<<<<< end read <<<<<<
>>
>
> Right, end of response, everything is OK.
>
> Cheers,
> Jan
>
> --
> Trojit?, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
>
> _______________________________________________
> Imap-protocol mailing list
> Imap-protocol@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>



-- 
Davide Gullo, Consulente Web (professionista disciplinato ai sensi della
legge 4/2013)
http://www.m4ss.net
gullo@m4ss.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20140730/96dab94d/attachment.html>
Reply
E-mail headers
From: jkt@flaska.net
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: e0e08cea-c8fa-4c6a-b6db-47a83bbe5821@flaska.net permalink / raw / eml / mbox
On Wednesday, 30 July 2014 18:33:42 CEST, Davide Gullo wrote:
> Ok Jan, I understand what you mean but the problem comes from the missed
> RFC822.
> The server does not send it, why?

What is a "missed RFC822"? Are you referring to RFC822.SIZE? I see it just 
fine in both untagged FETCH responses which the server sent you. Maybe 
you're confused by the fact that the literal syntax split the response into 
multiple "lines"? It's still a single response.

BTW, do you realize that it would be perfectly OK for the server to 
actually send many responses instead of a single one, like this:

* 1 FETCH (X-GM-MSGID 1345148067064026772 UID 7848)\r\n
* 1 FETCH (RFC822.SIZE 1372 BODY[HEADER.FIELDS (References)] 
{2}\r\n\r\n)\r\n
* 1 FETCH (FLAGS (\Seen) ENVELOPE (...))\r\n
* 1 FETCH (BODY[HEADER.FIELDS (References)] {2}\r\n\r\n)\r\n

I have no idea what else you're asking about, sorry.

Cheers,
Jan

-- 
Trojit?, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
Reply
E-mail headers
From: arnt@gulbrandsen.priv.no
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: 9b80c7bb-b901-4e52-a3ab-db7bee7018aa@gulbrandsen.priv.no permalink / raw / eml / mbox
On Wednesday, July 30, 2014 6:33:42 PM CEST, Davide Gullo wrote:
> Ok Jan, I understand what you mean but the problem comes from 
> the missed RFC822.

It's called BODY in the response.

> The server does not send it, why?

BODY has largely superseded RFC822. Good clients ask for BODY instead. UID 
FETCH 1234 BODY[1] etc.

Arnt
Reply
E-mail headers
From: gullo@m4ss.net
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: CANVPb6tNrOKGe0jpjyAkf8z5qYnsBkDpQ97hULfm5RMyr2sJhw@mail.gmail.com permalink / raw / eml / mbox
This is a log from another account:

*2014-07-30 18:50:05.332 BackUp Gmail[7934:2307] >>> 4 UID FETCH
198358:198635 (UID X-GM-MSGID FLAGS RFC822.SIZE ENVELOPE
BODY.PEEK[HEADER.FIELDS (References)] BODYSTRUCTURE RFC822)*

*2014-07-30 18:50:05.333 BackUp Gmail[7934:2307] >>> >>>>>>> end send
>>>>>>*

*2014-07-30 18:50:05.591 BackUp Gmail[7934:2307] <<< <<<<<<< read <<<<<<*

*2014-07-30 18:50:05.592 BackUp Gmail[7934:2307] <<< * 45211 FETCH
(X-GM-MSGID 1472932652151963247 UID 198358 RFC822.SIZE 3631 RFC822 {3631}*

*Delivered-To: jazzo72@gmail.com <jazzo72@gmail.com>*

*Received: by 10.221.27.131 with SMTP id rq3csp536493vcb;*

*        Sun, 6 Jul 2014 18:54:00 -0700 (PDT)*

*..*

*..*

*[here there is a lot of data: the RFC822 field]*

*..*

*..*

*e8cacbee0fc1368da87.gif" width="1" /></p>*

*----==_mimepart_53b9fdb735668_75643fd39d2f52a04456d8--*

* FLAGS (\Seen) ENVELOPE ("Sun, 06 Jul 2014 18:53:59 -0700" "Re: [libetpan]
Very big allocation (#150)" (("=?ISO-8859-1?Q?Ho=E0_V._DINH?=" NIL
"notifications" "github.com <http://github.com>"))
(("=?ISO-8859-1?Q?Ho=E0_V._DINH?=" NIL "notifications" "github.com
<http://github.com>")) (("dinhviethoa/libetpan" NIL
"reply+i-37227579-fd8194f6b5e1ca5e2c8070c49eb84688e1b4223a-1465434"
"reply.github.com <http://reply.github.com>")) (("dinhviethoa/*

*2014-07-30 18:50:05.600 BackUp Gmail[7934:2307] <<< <<<<<<< end read
<<<<<<*

*2014-07-30 18:50:05.601 BackUp Gmail[7934:2307] <<< <<<<<<< read <<<<<<*

*2014-07-30 18:50:05.602 BackUp Gmail[7934:2307] <<< libetpan" NIL
"libetpan" "noreply.github.com <http://noreply.github.com>")) (("Davide
Gullo" NIL "jazzo72" "gmail.com <http://gmail.com>")) NIL
"<dinhviethoa/libetpan/issues/150@github.com <150@github.com>>"
"<dinhviethoa/libetpan/issues/150/48134817@github.com
<48134817@github.com>>") BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "UTF-8")
NIL NIL "7BIT" 273 8 NIL NIL NIL)("TEXT" "HTML" ("CHARSET" "UTF-8") NIL NIL
"7BIT" 621 5 NIL NIL NIL) "ALTERNATIVE" ("BOUNDARY"
"--==_mimepart_53b9fdb735668_75643fd39d2f52a04456d8" "CHARSET" "UTF-8") NIL
NIL) BODY[HEADER.FIELDS (References)] {60}*

*References: <dinhviethoa/libetpan/issues/150@github.com <150@github.com>>*


*)*



As you can see above the RFC822 is the email data (header and body).
What I wrong?





2014-07-30 18:40 GMT+02:00 Jan Kundr?t <jkt@flaska.net>:

> On Wednesday, 30 July 2014 18:33:42 CEST, Davide Gullo wrote:
>
>> Ok Jan, I understand what you mean but the problem comes from the missed
>> RFC822.
>> The server does not send it, why?
>>
>
> What is a "missed RFC822"? Are you referring to RFC822.SIZE? I see it just
> fine in both untagged FETCH responses which the server sent you. Maybe
> you're confused by the fact that the literal syntax split the response into
> multiple "lines"? It's still a single response.
>
> BTW, do you realize that it would be perfectly OK for the server to
> actually send many responses instead of a single one, like this:
>
> * 1 FETCH (X-GM-MSGID 1345148067064026772 UID 7848)\r\n
> * 1 FETCH (RFC822.SIZE 1372 BODY[HEADER.FIELDS (References)]
> {2}\r\n\r\n)\r\n
> * 1 FETCH (FLAGS (\Seen) ENVELOPE (...))\r\n
> * 1 FETCH (BODY[HEADER.FIELDS (References)] {2}\r\n\r\n)\r\n
>
> I have no idea what else you're asking about, sorry.
>
>
> Cheers,
> Jan
>
> --
> Trojit?, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
> _______________________________________________
> Imap-protocol mailing list
> Imap-protocol@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>



-- 
Davide Gullo, Consulente Web (professionista disciplinato ai sensi della
legge 4/2013)
http://www.m4ss.net
gullo@m4ss.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20140730/456c14fb/attachment.html>
Reply
E-mail headers
From: gullo@m4ss.net
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: CANVPb6v7fm=O8zn1pRU=boNzHzyrTibe_CM_Nu=-cDgpR4XNPw@mail.gmail.com permalink / raw / eml / mbox
Sorry Arnt,
I follow the rfc3501 and in the 7.4.2
<http://tools.ietf.org/html/rfc3501#section-7.4.2> section you can read:


 RFC822 <http://tools.ietf.org/html/rfc822>
         Equivalent to BODY[].



What is a "good client"?





2014-07-30 18:53 GMT+02:00 Arnt Gulbrandsen <arnt@gulbrandsen.priv.no>:

> On Wednesday, July 30, 2014 6:33:42 PM CEST, Davide Gullo wrote:
>
>> Ok Jan, I understand what you mean but the problem comes from the missed
>> RFC822.
>>
>
> It's called BODY in the response.
>
>
>  The server does not send it, why?
>>
>
> BODY has largely superseded RFC822. Good clients ask for BODY instead. UID
> FETCH 1234 BODY[1] etc.
>
> Arnt
>
>
> _______________________________________________
> Imap-protocol mailing list
> Imap-protocol@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>



-- 
Davide Gullo, Consulente Web (professionista disciplinato ai sensi della
legge 4/2013)
http://www.m4ss.net
gullo@m4ss.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20140730/188e857b/attachment.html>
Reply
E-mail headers
From: jkt@flaska.net
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: 2b103f33-47ba-4463-a0bc-725398f92e52@flaska.net permalink / raw / eml / mbox
On Wednesday, 30 July 2014 18:57:01 CEST, Davide Gullo wrote:
> As you can see above the RFC822 is the email data (header and body).
> What I wrong?

Ah, so this has nothing to do with RFC822.SIZE or sizes of anything else, 
for that matter. You are complaining that the server did not return the 
"RFC822" item which Arnt points out is nowadays usually referred to as 
BODY[].

I have no idea why GMail skips it, sorry. It seems reasonable to expect 
that the server should return it as RFC822, so it appears that it's a GMail 
bug of some sort.

Cheers,
Jan

-- 
Trojit?, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
Reply
E-mail headers
From: arnt@gulbrandsen.priv.no
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: ae280bb1-9143-4e5b-b05d-aeb1c90343bf@gulbrandsen.priv.no permalink / raw / eml / mbox
On Wednesday, July 30, 2014 7:04:01 PM CEST, Davide Gullo wrote:
> I follow the rfc3501 and in the 7.4.2 section you can read:
>
>  RFC822
>          Equivalent to BODY[].

I see now. I was confused by the way you issued both body[...]/envelope and 
rfc822, sorry.

Why do you want to download e.g. the From address twice?

> What is a "good client"?

Same as for every network protocol: One that downloads little more than it 
uses, that doesn't send unnecessary commands, that chooses efficient and 
effective commands for its purpose, and that avoids making its user wait 
for the network.

Most clients have both good and bad aspects. For example, the client I'm 
using to type this only downloads one copy of the From address for a 
message, and doesn't download large attachments unless I need those 
attachments: Good. But it's also checked the number of messages in the 
Drafts folder dozens of time while I was sleeping in my bed tonight: Bad.

Arnt
Reply
E-mail headers
From: blong@google.com
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: CABa8R6vB_CtJZ=-y+KJGQyTOKL-MjfKMZS==3LBhA_Kou7v9hw@mail.gmail.com permalink / raw / eml / mbox
I'll file a bug, not sure what's going on there.

Brandon


On Wed, Jul 30, 2014 at 11:10 AM, Jan Kundr?t <jkt@flaska.net> wrote:

> On Wednesday, 30 July 2014 18:57:01 CEST, Davide Gullo wrote:
>
>> As you can see above the RFC822 is the email data (header and body).
>> What I wrong?
>>
>
> Ah, so this has nothing to do with RFC822.SIZE or sizes of anything else,
> for that matter. You are complaining that the server did not return the
> "RFC822" item which Arnt points out is nowadays usually referred to as
> BODY[].
>
> I have no idea why GMail skips it, sorry. It seems reasonable to expect
> that the server should return it as RFC822, so it appears that it's a GMail
> bug of some sort.
>
>
> Cheers,
> Jan
>
> --
> Trojit?, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
> _______________________________________________
> Imap-protocol mailing list
> Imap-protocol@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20140730/ada1f21b/attachment.html>
Reply
E-mail headers
From: gullo@m4ss.net
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:53 -0000
Message-ID: CANVPb6tCigWZF-4CbzErH6v8Hncuf8VgQ8LcPTHjy+2TxDaA-Q@mail.gmail.com permalink / raw / eml / mbox
@Arnt
it is not a client. It is the app "BackUp Gmail" for OSX so it needs to
download the complete RFC822 field to store all the content in an eml file.

@Jan
Yes, sorry. I realized the real error just after your first email in this
thread. Thanks!



2014-07-31 8:59 GMT+02:00 Arnt Gulbrandsen <arnt@gulbrandsen.priv.no>:

> On Wednesday, July 30, 2014 7:04:01 PM CEST, Davide Gullo wrote:
>
>> I follow the rfc3501 and in the 7.4.2 section you can read:
>>
>>  RFC822
>>          Equivalent to BODY[].
>>
>
> I see now. I was confused by the way you issued both body[...]/envelope
> and rfc822, sorry.
>
> Why do you want to download e.g. the From address twice?
>
>
>  What is a "good client"?
>>
>
> Same as for every network protocol: One that downloads little more than it
> uses, that doesn't send unnecessary commands, that chooses efficient and
> effective commands for its purpose, and that avoids making its user wait
> for the network.
>
> Most clients have both good and bad aspects. For example, the client I'm
> using to type this only downloads one copy of the From address for a
> message, and doesn't download large attachments unless I need those
> attachments: Good. But it's also checked the number of messages in the
> Drafts folder dozens of time while I was sleeping in my bed tonight: Bad.
>
>
> Arnt
>
> _______________________________________________
> Imap-protocol mailing list
> Imap-protocol@u.washington.edu
> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>



-- 
Davide Gullo, Consulente Web (professionista disciplinato ai sensi della
legge 4/2013)
http://www.m4ss.net
gullo@m4ss.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20140731/12895139/attachment.html>
Reply