Closed Bug 234450 Opened 21 years ago Closed 19 years ago

Protocol Error RFC822.peek should be BODY.peek

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED EXPIRED

People

(Reporter: panda, Assigned: mscott)

References

(Blocks 1 open bug)

Details

User-Agent:       
Build Identifier: Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.5) Gecko/20040213 Firebird/0.7

When first login into an imap server, thunderbird issues the imap command;
"RFC822.peek" which isn't defined in IMAP4rev1 (in IMAP4rev1, BODY.peek is
available), thus breaking thunderbird's RFC3501 compliance.

Reproducible: Always
Steps to Reproduce:
1. launch tcpdump or any network traffic sniffer
2. establish a connection to an IMAP server
3. examine the transaction (with ethereal for instance)

Actual Results:  
Most IMAP servers simply refuse the command.
This behavior does not happen often since most IMAP servers have enough
"capabilities" enabled to bypass the use of this command.

Here is a sample transaction log (extracted from the Follow TCP Stream option in
ethereal):

* OK
1 capability
* CAPABILITY IMAP4 AUTH=LOGIN
1 OK
2 authenticate login
2 NO Error
3 login "jyce@jyce.org" "jyce"
3 OK
4 lsub "" "*"
* lsub () "." INBOX
* lsub () "." Amavis
* lsub () "." Trash
* lsub () "." INBOX.Aventis
4 OK
5 lsub "" "*"
* lsub () "." INBOX
* lsub () "." Amavis
* lsub () "." Trash
* lsub () "." INBOX.Aventis
5 OK
6 list "" "INBOX"
6 OK
7 select "INBOX"
* 3 EXISTS
7 OK
8 UID fetch 1:* (FLAGS)
* 1 FETCH (UID 1 FLAGS (\RECENT))
* 2 FETCH (UID 2 FLAGS (\RECENT))
* 3 FETCH (UID 3 FLAGS (\RECENT))
8 OK
9 UID fetch 1:3 (UID RFC822.SIZE RFC822.HEADER FLAGS)
* 1 FETCH (UID 1 UID 1 RFC822.SIZE {408} RFC822.HEADER {407}
Date: Sun, 21 Sep 2003 15:57:34 +0200
From: Jean Christophe Valiere <jyce@jyce.org>
To: jyce
Subject: TEST de SendMail
Message-Id: <20030921155734.11831180.jyce@jyce.org>
Organization: Jyce Organisation
X-Mailer: Sylpheed version 0.9.3 (GTK+ 1.2.10; i386--netbsdelf)
X-Operating-System: NetBSD-Rulezz
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

 FLAGS (\RECENT))
* 2 FETCH (UID 2 UID 2 RFC822.SIZE {5404} RFC822.HEADER {830}
Received: from uvm3 ([194.3.168.82])
        by epita.fr id h4QMUxX27254 for <valier_j@epita.fr> 
        EPITA Paris France Tue, 27 May 2003 00:30:59 +0200 (MEST)
Received: from mail pickup service by uvm3 with Microsoft SMTPSVC;
         Tue, 27 May 2003 00:29:01 +0200
From: "01net.partenaires" <327677.786_01net.partenaires@lettres.01net.com>
To: "valier_j@epita.fr" <valier_j@epita.fr>
Subject: Les Web Services : un nouvel atout pour l'entreprise étendue
MIME-Version: 1.0
Reply-To: <01net.partenaires@01net.fr>
Errors-To: <327677.786_01net.partenaires@lettres.01net.com>
Content-Type: text/html;
        charset="iso-8859-1"
Message-ID: <UVM3zUnCLLcfQK0rSs1001154fe@uvm3>
X-OriginalArrivalTime: 26 May 2003 22:29:01.0062 (UTC) FILETIME=[34B2EA60:01C323D6]
Date: 27 May 2003 00:29:01 +0200
Status: O
Content-Length: 4593
Lines: 65

 FLAGS (\RECENT))
* 3 FETCH (UID 3 UID 3 RFC822.SIZE {2885} RFC822.HEADER {993}
Received: from facteur.ixo.com (ns1.ixo.com [62.210.155.17])
        by epita.fr id h4QNB8X02363 for <jean-christophe.valiere@epita.fr> 
        EPITA Paris France Tue, 27 May 2003 01:11:08 +0200 (MEST)
Received: from ixo.fr (mailbox.zonejeux.com [62.210.155.73])
        by facteur.ixo.com (8.11.1/8.11.1) with SMTP id h4QN9Kc61733;
        Tue, 27 May 2003 01:09:26 +0200 (CEST)
        (envelope-from newsletter@zonejeux.com)
Received: from pong ( Unverified [62.210.155.71] ) by ixo.fr with SMTP id
10537.6249740.817417;
        Mon, 26 May 2003  22:38:42  +0200
Date: Mon, 26 May 2003  22:38:38  +0200
From: <newsletter@zonejeux.com>
sender: <newsletter@zonejeux.com>
Reply-To: <newsletter@zonejeux.com>
bcc:
bcc:
Message-ID: <1053981518.13911@zonejeux.com>
Subject: =?iso-8859-1?Q?Gagnez_des_=E9crans_plats,_des_lecteurs_mp3_...?=
X-Mailer: IXO-Mail 1.0.0
MIME-Version: 1.0
Content-Type:
multipart/alternative;boundary="==--1391==1--1053981518==--@zonejeux.com";
Status: O
Content-Length: 1915
Lines: 58

 FLAGS (\RECENT))
9 OK
10 UID fetch 1 (UID RFC822.SIZE RFC822.peek)
* 1 FETCH (UID 1 UID 1 RFC822.SIZE {408}RFC822 ("text" "plain"))
10 OK


Expected Results:  
Thunderbird should issue BODY.peek commands
Blocks: 269826
No longer depends on: 269826
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED

Hello,

I observed the same bug today. Thunderbird (v91.3.1) sent the following line to my testing IMAP server¹ which resulted in a parsing error:

97 UID fetch 1:3 (UID RFC822.SIZE RFC822.peek)\r\n
                                  ^^^^^^^^^^^
     			          |
     			          | this is invalid according to RFC 3501

<fetch-att> is defined as follows

fetch-att = "ENVELOPE" /
	    "FLAGS" /
	    "INTERNALDATE" /
	    "RFC822" [".HEADER" / ".SIZE" / ".TEXT"] /
	    "BODY" ["STRUCTURE"] /
	    "UID" /
	    "BODY" section ["<" number "." nz-number ">"] /
	    "BODY.PEEK" section ["<" number "." nz-number ">"]

and "RFC822.peek" is not valid according to this grammar.

I can imagine that this is a hard to spot bug! Maybe it is helpful to note that this bug is still present.

¹ https://github.com/Email-Analysis-Toolkit/fake-mail-server:


Here is the full IMAP trace for reference:

S: * OK ...\r\n
C: 89 STARTTLS\r\n
S: 89 OK ...\r\n
<----- TLS handshake ----->
C: 90 capability\r\n
S: * CAPABILITY \r\n
S: 90 OK capability done.\r\n
C: 92 login "<user>" "<password>"\r\n
S: 92 OK login done.\r\n
C: 93 capability\r\n
S: * CAPABILITY \r\n
S: 93 OK capability done.\r\n
C: 94 select "INBOX"\r\n
S: * FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)\r\n
S: * 3 EXISTS\r\n
S: * 3 RECENT\r\n
S: * OK [UNSEEN 1] first message without the \\Seen flag set.\r\n
S: * OK [PERMANENTFLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)] flags the client can change permanently.\r\n
S: * OK [UIDNEXT 296971312] the next unique identifier value.\r\n
S: * OK [UIDVALIDITY 1895056861] the unique identifier validity value.\r\n
S: 94 OK [READ-WRITE] select/examine done.\r\n
C: 95 UID fetch 1:* (FLAGS)\r\n
S: * 1 FETCH (UID 1 FLAGS (\\Recent))\r\n
S: * 2 FETCH (UID 2 FLAGS (\\Recent))\r\n
S: * 3 FETCH (UID 3 FLAGS (\\Recent))\r\n
S: 95 OK fetch done.\r\n
C: 96 UID fetch 1:3 (UID RFC822.SIZE RFC822.HEADER FLAGS)\r\n
S: * 1 FETCH (UID 1 RFC822.SIZE 6 RFC822.HEADER {41}\r\n
.. From: Alice\r\n
.. To: Bob\r\n
.. Subject: Hello!\r\n
.. \r\n
..  FLAGS (\\Recent))\r\n
S: * 2 FETCH (UID 2 RFC822.SIZE 6 RFC822.HEADER {41}\r\n
.. From: Alice\r\n
.. To: Bob\r\n
.. Subject: Hello!\r\n
.. \r\n
..  FLAGS (\\Recent))\r\n
S: * 3 FETCH (UID 3 RFC822.SIZE 6 RFC822.HEADER {41}\r\n
.. From: Alice\r\n
.. To: Bob\r\n
.. Subject: Hello!\r\n
.. \r\n
..  FLAGS (\\Recent))\r\n
S: 96 OK fetch done.\r\n
C: 97 UID fetch 1:3 (UID RFC822.SIZE RFC822.peek)\r\n
{"message": "Parsing error/failure", "remainder": "97 UID fetch 1:3 (UID RFC822.SIZE RFC822.peek)\\r\\n"}
S: 97 OK keep going.\r\n
{"message": "read (metadata)", "event": "\"recv timeout\""}
You need to log in before you can comment on or make changes to this bug.