Subject: pc-pine 4.41 bug: answered messages not marked with A

From: Nancy McGough <[email-masked]>
Date: Sun, 18 Nov 2001 11:31:00 +0000 (GMT)

Is anyone else seeing this problem? I just had it happen using a
couple roles.

Thanks,
Nancy

-- 
ii Main Pine Page: <http://www.ii.com/internet/messaging/pine/>

Nancy McGough           <http://www.ii.com/>           Infinite Ink
--= Sent via Pine 4.41: IMAP, NNTP & ESMTP for Unix/Win/MacOS X =--

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Nancy McGough <[email-masked]>
Date: Sun, 18 Nov 2001 12:23:18 +0000 (GMT)

Here's some more on this bug: I don't see the A in the index when
I use the token IMAPSTATUS. I just changed it to STATUS and now I
do see the A so it seems to be a problem with the IMAPSTATUS
token.

Thanks,
Nancy

---

From: Eduardo Chappa <[email-masked]>
Date: Sun, 18 Nov 2001 12:22:21 -0800 (PST)

> do see the A so it seems to be a problem with the IMAPSTATUS

Do you get the folder closed too?. I saw the bug yesterday, but didn't pay
much attention to it, because I was paying attention to the fact that the
folder was getting closed. So here's my problem.

  When I reply to a message which I am reading through IMAP, somehow a new
connection to the folder is opened to update the Answered status, this
makes the second session take the lock of the first, so when I come back
to the original session I have lost the lock, resulting in a folder closed
and not updated the answered flag (which I see when the folder is
reopened). Here's my debug information of a message which I replied to
myself (I guess I don't get enough e-mail :))

Debug output of the Pine program (debug=2 debug_imap=4). Version 4.41
Sun Nov 18 12:04:06 2001

[snip]
#
#OPENING INBOX
#
Context {news.u.washington.edu/nntp}#news.%s: serv:news.u.washington.edu/nntp, ref:"", view: ""
About to open folder "INBOX"    inbox: "INBOX"

IMAP DEBUG 12:04:11 11/18: 00000001 SELECT inbox
IMAP DEBUG 12:04:11 11/18: * 2 EXISTS
=== mm_exists(2,{mailhost.math.washington.edu/ssl/user=chappa}inbox) called ===
IMAP DEBUG 12:04:11 11/18: * 0 RECENT

#
#ANSWER A MESSAGE
#

=== send called ===

  ---- COMPOSER ----
new win size -----<25 80>------
IMAP DEBUG 12:04:30 11/18: 0000000a NOOP
IMAP DEBUG 12:04:30 11/18: 0000000a OK NOOP completed
new win size -----<25 80>------
Want_to read: y (121)
new win size -----<25 80>------
mm_list "mail/sent-mail": delim: '/', , no inferiors, marked
IMAP 12:04:35 11/18 mm_log babble: Trying IP address
Opened SMTP server
done.

#
# Mail sent, now updating answered flag
#

IMAP 12:04:36 11/18 mm_log babble: Trying IP address [128.95.224.1]

IMAP DEBUG 12:04:36 11/18: 00000000 OK AUTHENTICATE completed
IMAP DEBUG 12:04:36 11/18: 00000001 SELECT inbox
IMAP DEBUG 12:04:37 11/18: * 3 EXISTS

# OUCH, it's going to get the lock!!!

IMAP DEBUG 12:04:37 11/18: * NO Trying to get mailbox lock from process 36737

IMAP DEBUG 12:04:37 11/18: * 1 RECENT
IMAP DEBUG 12:04:37 11/18: * OK [UNSEEN 1] first unseen message in /var/spool/mail/chappa
IMAP DEBUG 12:04:37 11/18: 00000001 OK [READ-WRITE] SELECT completed
#
# Finally it will update the Answered Flag!
#
IMAP DEBUG 12:04:37 11/18: 00000002 UID STORE 2733 +Flags (\ANSWERED)
IMAP DEBUG 12:04:37 11/18: * 2 FETCH (FLAGS (\Answered) UID 2733)
IMAP DEBUG 12:04:37 11/18: 00000002 OK UID STORE completed
IMAP DEBUG 12:04:37 11/18: 00000003 LOGOUT
IMAP DEBUG 12:04:37 11/18: * BYE euler.math.washington.edu IMAP4rev1 server terminating connection
IMAP DEBUG 12:04:37 11/18: 00000003 OK LOGOUT completed
IMAP DEBUG 12:04:39 11/18: 0000000b NOOP
IMAP DEBUG 12:04:39 11/18: * BYE Lost mailbox lock

-- 
Eduardo
http://www.math.washington.edu/~chappa/pine/

---

From: Eduardo Chappa <[email-masked]>
Date: Sun, 18 Nov 2001 15:10:57 -0800 (PST)

*** On Sun, 18 Nov 2001 I wrote:

:)   When I reply to a message which I am reading through IMAP, somehow a
:) new connection to the folder is opened to update the Answered status,
:) this makes the second session take the lock of the first, so when I
:) come back to the original session I have lost the lock, resulting in a
:) folder closed and not updated the answered flag (which I see when the
:) folder is reopened). Here's my debug information of a message which I
:) replied to myself (I guess I don't get enough e-mail :))

I created a patch that fixes this problem for me. If anyone is interested
in the patch pick it up from my web page.