Closed Bug 66152 Opened 24 years ago Closed 23 years ago

Courier-IMAP: after first open File|Get New Messages or GetMsg button makes IMAP server report error in client command

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
FreeBSD
defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: areilly, Assigned: Bienvenu)

References

()

Details

(Keywords: imap-interop)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; FreeBSD 4.2-STABLE i386; en-US; 0.7) Gecko/20010121
BuildID:    20010121

With mozilla 0.7 (and also M18) compiled from the ports collection on FreeBSD,
any of: scheduled mailbox check, pressing the Get Msg button, or selecting the
File|Get New Messages will fail, producing an alert box that says "The current
command did not succeed.  The mail server responded:Error in IMAP command
received by server."

As can be seen from the transcript in the additional information section, below,
the IMAP server seems to be justified in its complaint, because MailNews seems
to be asking for message number -1, which is syntactically broken wrt the IMAP spec.

The IMAP server in question is courier-imap-1.3.0, also built on this FreeBSD
4.2-stable system.

Reproducible: Always
Steps to Reproduce:
run "mozilla -mail"
Wait for inbox list to be displayed.
Wait for new mail to arrive, as displayed by external biff program, or because
you use another mail client to send yourself a test message.  I think that it's
even OK to use mozilla MailNews itself to send this test message.
Press the Get Msg button, or wait for the scheduled INBOX scan as configured in
the MailNews preferences.
The client will respond with the error mentioned above every time.
The _only_ way to get the MailNews client to see the newly arrived messages is
to exit completely and restart.

Actual Results:  I was shown the Alert dialog described above, and could not
proceed until I pressed the OK button.

Expected Results:  I expect that MailNews would have retrieved the headers of
the new messages, and displayed the relevant parts in the headers window, and
maybe even the new body of the first new message in the preview window.

I can't remember the incantation that I used to make mozilla produce this
output: I got it from an older but seemingly unrelated bug.  It causes Mozilla
to dump a log file "map5io.txt" in my home directory...

141985792[8a2b780]: localhost:NA:CreateNewLineFromSocket: * OK Courier-IMAP read
y. Copyright 1998-2000 Double Precision, Inc.  See COPYING for distribution info
rmation.
141985792[8a2b780]: localhost:NA:SendData: 1 capability
141985792[8a2b780]: localhost:NA:CreateNewLineFromSocket: * CAPABILITY IMAP4rev1
 CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT STARTTLS
141985792[8a2b780]: localhost:NA:CreateNewLineFromSocket: 1 OK CAPABILITY comple
ted
141985792[8a2b780]: localhost:NA:SendData: Logging suppressed for this command (
it probably contained authentication information)
141985792[8a2b780]: localhost:NA:CreateNewLineFromSocket: 2 OK LOGIN Ok.
141985792[8a2b780]: localhost:A:SendData: 3 namespace
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * NAMESPACE (("INBOX."
".")) NIL (("shared." "."))
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: 3 OK NAMESPACE complete
d.
141985792[8a2b780]: localhost:A:SendData: 4 lsub "" "INBOX.*"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.others"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.in_sursound"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.in_slug"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.in_se"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.in_netbsd"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.in_freebsdcvs"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.in_freebsd"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.bugs"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.Unix"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.Trash"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.Syrinx"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.Suppliers"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.Sent"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.QUT"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.Kralizec"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
"." "INBOX.Friends"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.Family"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.DSP"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LSUB (\HasNoChildren)
 "." "INBOX.BigPond"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: 4 OK LSUB completed
141985792[8a2b780]: localhost:A:SendData: 5 lsub "" "shared.*"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: 5 OK LSUB completed
141985792[8a2b780]: localhost:A:SendData: 6 list "" "INBOX"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * LIST (\Marked \HasChi
ldren) "." "INBOX"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: 6 OK LIST completed
141985792[8a2b780]: localhost:A:SendData: 7 select "INBOX"
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * FLAGS (\Answered \Fla
gged \Deleted \Seen \Recent)
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * OK [PERMANENTFLAGS (\
Answered \Flagged \Deleted \Seen)] Limited
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * 2 EXISTS
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * 1 RECENT
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: * OK [UIDVALIDITY 97315
1407] Ok
141985792[8a2b780]: localhost:A:CreateNewLineFromSocket: 7 OK [READ-WRITE] Ok
141985792[8a2b780]: localhost:S-INBOX:SendData: 8 UID fetch 1:* (FLAGS)
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: * 1 FETCH (UID 15
73 FLAGS (\Seen))
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: * 2 FETCH (UID 16
57 FLAGS (\Recent))
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: 8 OK FETCH comple
ted.
141985792[8a2b780]: localhost:S-INBOX:SendData: 9 UID fetch 1657 (UID RFC822.SIZ
E FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (Priority X-Priority References Newsgro
ups)])
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: * 2 FETCH (UID 16
57 RFC822.SIZE 508 FLAGS (\Recent) ENVELOPE ("Mon, 22 Jan 2001 09:39:03 +1100" "
test" (("Andrew Reilly" NIL "areilly" "bigpond.net.au")) (("Andrew Reilly" NIL "
areilly" "bigpond.net.au")) (("Andrew Reilly" NIL "areilly" "bigpond.net.au")) (
("Andrew Reilly" NIL "andrew" "gurney.reilly.home")) NIL NIL NIL "<2001012209390
3.A33754@gurney.reilly.home>") BODY[HEADER.FIELDS ("Priority" "X-Priority" "Refe
rences" "Newsgroups")] {2}
141985792[8a2b780]: localhost:S-INBOX:STREAM:OPEN Size: 508: Begin Message Downl
oad Stream
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket:
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: )
141985792[8a2b780]: localhost:S-INBOX:STREAM:CLOSE: Normal Message End Download
Stream
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: 9 OK FETCH completed.
141985792[8a2b780]: localhost:S-INBOX:SendData: 10 UID fetch 1657 (UID RFC822.SI
ZE BODY[])
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: * 2 FETCH (UID 16
57 RFC822.SIZE 508 BODY[] {508}
141985792[8a2b780]: localhost:S-INBOX:STREAM:OPEN Size: 508: Begin Message Downl
oad Stream
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: Return-Path: <are
illy@bigpond.net.au>
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: Delivered-To: and
rew@gurney.reilly.home
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: Received: (qmail
33759 invoked by uid 1000); 21 Jan 2001 22:39:03 -0000
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: From: "Andrew Rei
lly" <areilly@bigpond.net.au>
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: Date: Mon, 22 Jan
 2001 09:39:03 +1100
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: To: Andrew Reilly
 <andrew@gurney.reilly.home>
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: Subject: test
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: Message-ID: <2001
0122093903.A33754@gurney.reilly.home>
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: Mime-Version: 1.0
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: Content-Type: tex
t/plain; charset=us-ascii
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: Content-Dispositi
on: inline
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: User-Agent: Mutt/
1.2.5i
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket:
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: Test from mutt
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket:
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: --
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: Andrew
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: )
141985792[8a2b780]: localhost:S-INBOX:STREAM:CLOSE: Normal Message End Download
Stream
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: * 2 FETCH (FLAGS
(\Seen \Recent))
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: 10 OK FETCH compl
eted.
141985792[8a2b780]: localhost:S-INBOX:SendData: 11 noop
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: * 3 EXISTS
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: * 2 RECENT
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: * 3 FETCH (FLAGS
(\Recent))
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: 11 OK NOOP comple
ted141985792[8a2b780]: localhost:S-INBOX:SendData: 12 UID fetch 1658:* (FLAGS)
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: * 3 FETCH (UID 16
58 FLAGS (\Recent))
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: 12 OK FETCH compl
eted.
141985792[8a2b780]: localhost:S-INBOX:SendData: 13 UID fetch -1,1658 (UID RFC822
.SIZE FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (Priority X-Priority References New
sgroups)])
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: 13 NO Error in IM
AP command received by server.
141985792[8a2b780]: localhost:S-INBOX:SendData: 14 expunge
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: 14 OK EXPUNGE com
pleted
141985792[8a2b780]: localhost:S-INBOX:SendData: 15 UID fetch 1659:* (FLAGS)
141985792[8a2b780]: localhost:S-INBOX:CreateNewLineFromSocket: 15 OK FETCH compl
eted.
134619136[8073200]: localhost:S-INBOX:SendData:TellThreadToDie: 16 close
134619136[8073200]: localhost:S-INBOX:SendData:TellThreadToDie: 17 logout
QA Contact: esther → huang
Can you reproduce this with the latest nightly build?

Thanks!
Confirming based on bug report quality.

Gerv
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: interop
Summary: after first open File|Get New Messages or GetMsg button makes IMAP server report error in client command → Courier-IMAP: after first open File|Get New Messages or GetMsg button makes IMAP server report error in client command
Linux x86

I can also confirm duplication with a number of releases including
M18, debian (ximian) package mozilla_1%3a0.8.1-ximian.11_all.deb, nightly build
from 05/07/2001, cvs from the same date

For clarification, all messages are retreived successfuly on the first attempt,
and no errors occur as long as there are no unread messages when mail is checked.

After this, if a new message is in the INBOX and mozilla checks it, a warning,
"The current command did not succeed.  The mail server responded: Error in IMAP
command received by server.." is presented.

I can confirm that mail can be sent from the client at all times, and sending an
email to the address that mozilla checks will cause the client to spaz out :)
I have a very similar problem with people with both Netscape 4 and Mozilla 0.9.1 reporting the same error message after upgrading our version of Courier server. I looked on the web and this is what one of the pages says

http://www.inter7.com/courierimap/README.imap.html

For the FAQ: Clicking on "Get new messages" results in an error message "Error in IMAP command received by server", or nothing happens at all when I know there are new messages in a shared folder. ANSWER: this is a known bug in Messenger's IMAP client. Complain to Netscape. You can try reinstalling Courier-IMAP with the --enable-workarounds-for-imap-client-bugs option, to see if it helps.

After doing the above mentioned change and recompiling Courier things magically started working again. If this is really a IMAP bug in Mozilla/Netscape client it would be nice if someone fixed it :-).
WRT to the above comment: YES, it would be VERY nice is someone would fix this,
since only Courier-IMAP has a mode where it can work with a buggy client such as
Netscape/Mozilla. Unfortunately for most of us, Mozilla demonstrates this
problem with all other IMAP servers that I've tried... :-(
this is most likely a dup of a bug I'll check in a fix for in the next couple
days. I'll find the dup later.
Assignee: mscott → bienvenu
marking fixed; please re-open if this still happens with a mozilla trunk build
from today, or a future trunk build.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified on 11-15-09-trunk build
Get Nsgs from Courier IMAP seems fine, but there are bugs for sending and
Courier IMAP folders -- see bug 107646 and bug 103749. Verified.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.