Subject: imapd seems to be stalling on certain messages

From: Brad Arlt <[email-masked]>
Date: Tue, 17 Sep 2002 16:14:41 -0600

Hello,

I recently attempted to upgrade to imap-2002-RC5 and 2002-RC6.

When viewing certain messages with Pine (v4.44), and during the
startup of TkRat 2.0.2 and 2.1 if certain messages are present in the
INBOX, the imapd server becomes unresponsive.  A strace reveals what
looks like a blocking read on the imap server.  If the messages are
placed in other folders, the same problem exists.  If each message is
isolated in its own folder, the problem still presists.

I regressed to 2001.309 and this "fixed" the problem, but would
desperately like to run 2002.

Oddly I have not been able to reproduce the errors with mutt, so there
seems to be a client side work around possible.

I believe I can provide you with a mailbox that will reproduce this
problem in Pine (I have to check with the owner of the message to see
if disclosing it is OK).

I can also provide a network trace, but I cannot for the life of me
figure out how to tell Pine to not use TLS even though the server
supports it.  Anyone?

I am running imapd on IRIX64 6.5.17, and have compiled imapd with
SGI's cc using OpenSSL 0.9.6c for RC5 and 0.9.6g for RC6 with the same
effect.  And I am using Unix mailbox formats.

Anyone have any clue what the deal is?
-----------------------------------------------------------------------
   __o		Bradley Arlt			Security Team Lead
 _ \<_		[email-masked]		University Of Calgary
(_)/(_) 	I should be biking right now.	Computer Science

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Friedrich Lobenstock <[email-masked]>
Date: Wed, 18 Sep 2002 00:41:03 +0200

> figure out how to tell Pine to not use TLS even though the server

{imap-server.domain.com/notls} option I guess

-- 
MfG / Regards
Friedrich Lobenstock

---

From: Mark Crispin <[email-masked]>
Date: Tue, 17 Sep 2002 15:43:17 -0700 (Pacific Daylight Time)

> isolated in its own folder, the problem still presists.

Please provide with with a sample mailbox (as a MIME attachment) which
demonstrates the problem and instructions on how to reproduce it.

It sounds like a bug, but without more information I have no way to fix
it.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.

---

From: Friedrich Lobenstock <[email-masked]>
Date: Wed, 18 Sep 2002 00:45:02 +0200

> {imap-server.domain.com/notls} option I guess

See also:
   http://www.washington.edu/imap/IMAP-FAQs/index.html#7.28

It's not quite the same topic but good as reference.

-- 
MfG / Regards
Friedrich Lobenstock

---

From: Brad Arlt <[email-masked]>
Date: Tue, 17 Sep 2002 17:02:31 -0600

> It sounds like a bug, but without more information I have no way to fix

I have stripped most of the good stuff out of the email.  I can
provide the original when the owner says sure, otherwise (and until
then) this is it.  I also didn't alter the content length or the
number of lines, but I figured you would have to be nuts to use either
so no harm.

I checked and it still hangs Pine and/or imapd.

One detail I forgot.  In all cases Pine and TkRat can read the mailbox
directly (both support the Unix mailbox format so I copied the INBOX
to see if it was just the client's problem) without any problems.  As
can mutt (v1.3.25 if it matters), but mutt never had/caused any
issues.
----------------------------------------------------------------------
   __o		Bradley Arlt			Security Team Lead
 _ \<_		[email-masked]		University Of Calgary
(_)/(_) 	I should be biking right now.	Computer Science

---

From: Mark Crispin <[email-masked]>
Date: Tue, 17 Sep 2002 16:43:48 -0700 (Pacific Daylight Time)

OK, I see what the problem is.  The message has Content-Location headers,
which is supported by the imap-2002 IMAP server in the BODYSTRUCTURE.
However, versions of c-client prior to the imap-2002 distribution have a
bug in which they incorrectly parse BODYSTRUCTURE extension data.

This bug is fixed in the imap-2002 c-client, but versions of Pine or other
programs built with older versions of c-client will be broken by this.

If you can wait a few more days, Pine 4.50 will be released which will fix
the bug.  Otherwise, you have the following choices:

Choice 1 (workaround): Remove content-location extension from imap-2002
imapd.

There are two occurrance of the following two lines in imapd.c:
      PBOUT (' ');
      pstring (body->location);
Remove both of them.

Choice 2 (bugfix): rebuild Pine (and any other programs using c-client)
with imap-2002 c-client.

Note that if the program uses [GS]ET_DISABLEAUTOMATICSHAREDNAMESPACES,
that symbol has been renamed to [GS]ET_DISABLEAUTOSHAREDNS.  You'll have
to edit a Pine source file for this.

-- Mark --

---

From: Brad Arlt <[email-masked]>
Date: Wed, 18 Sep 2002 15:56:51 -0600

> the bug.  Otherwise, you have the following choices:

Super... I can wait before I play with anything.  I will make a patch
for TkRat when Pine 4.50 is released.

Thank you for your help.