Subject: characters in quoted strings

From: Tomas Styblo <[email-masked]>
Date: Thu, 7 Mar 2002 18:56:03 +0100

Hello.

Our users connecting to the Courier IMAP server have passwords 
with '[', ']', and '}' characters in them.

C-client library sends arguments which contain these characters in plain
text, ie. not as quoted strings. 

This is the relevant part of the imap_send_astring 
function in imap4r1.c:

    case '(': case ')': case '{': case ' ': case 0x7f: 
    qflag = T;          /* must use quoted string format */
    break;
    ...

Courier IMAP server accepts these characters only in quoted strings.

So the question is - is c-client or the Courier IMAP server in violation
with RFCs ?

-- 
Tomas Styblo
Programmer

Czech On Line, a.s.
U nakladoveho nadrazi 8,
130 00 Praha 3, Czech Republic
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Thu, 7 Mar 2002 11:31:43 -0800 (PST)

> text, ie. not as quoted strings.

This is correct.  Those three characters are not ATOM_SPECIALS.  From RFC
2060:

atom            ::= 1*ATOM_CHAR

ATOM_CHAR       ::= <any CHAR except atom_specials>

atom_specials   ::= "(" / ")" / "{" / SPACE / CTL / list_wildcards /
                    quoted_specials

CTL             ::= <any ASCII control character and DEL,
                        0x00 - 0x1f, 0x7f>

list_wildcards  ::= "%" / "*"

SPACE           ::= <ASCII SP, space, 0x20>

quoted_specials ::= <"> / "\"

In plain English, any graphic ASCII character (0x41 - 0x1e) except for these
seven characters:
	( ) { % * " \
may be in an unquoted atom.

> Courier IMAP server accepts these characters only in quoted strings.

This is incorrect.

> So the question is - is c-client or the Courier IMAP server in violation

It's a well-known old bug in Courier IMAP.  The author of Courier IMAP has
stated that he refuses to fix it.  I gave up on him a long time ago.

---

From: Tomas Styblo <[email-masked]>
Date: Fri, 8 Mar 2002 12:40:29 +0100

> stated that he refuses to fix it.  I gave up on him a long time ago.

Thank you very much for your response. I understand why you do not want
to patch c-client to fix this problem, which is not c-client's fault. 

But for us the obvious solution is to patch c-client to send these
characters only in quoted strings. 

Have you considered to make some 
'--with-courier-bugs-workaround' compilation option ?

-- 
Tomas Styblo
Programmer

Czech On Line, a.s.
U nakladoveho nadrazi 8,

---

From: Mark Crispin <[email-masked]>
Date: Fri, 8 Mar 2002 09:07:08 -0800 (Pacific Standard Time)

> to patch c-client to fix this problem, which is not c-client's fault.

Also because the author of Courier IMAP deliberately defies the published
specification.  He has stated his intention to force a change in the
syntax of IMAP to comply with his idea of what the syntax should be.

This is not an issue of working around an inadvertant problem which will
eventually be fixed.

As far as I'm concerned, it's a feature that Courier IMAP is broken, and
it should stay broken until Courier IMAP is fixed to comply with the
standard.

> characters only in quoted strings.

There is another obvious solution: don't run Courier IMAP, use some other
IMAP server.  As long as you run Courier IMAP, you will potentially have
this problem with any IMAP client, including some that you won't get
sources to.  Courier IMAP can not be considered to be a serious player in
the IMAP market until it complies with the standard.

> '--with-courier-bugs-workaround' compilation option ?

No, I haven't.  It's a slippery slope, and ultimately it will harm the
standardization of the IMAP protocol.  It's bad enough to have to make
concessions to Netscape and Microsoft, but at least those concessions are
for stupid behaviors which are nonetheless technically compliant with the
specification.

I realize that people like you are stuck in the middle.  If I were you, I
would seriously consider another IMAP server.  If you really want the
one-message/one-file type of format, consider the Cyrus server.

-- Mark --

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

---

From: Andrew Babb <[email-masked]>
Date: Fri, 08 Mar 2002 14:58:50 -0800

Hi,

We are wanting to install the UofW IMAP Server on an HP-UX v11.0 server, but
the makefile does not list HP-UX v11.0 as one of the platforms. Has anyone
completed this yet, and if so were any changes to the makefile required.

TIA
Andrew

---

From: Mark Crispin <[email-masked]>
Date: Fri, 8 Mar 2002 15:10:38 -0800 (PST)

> completed this yet, and if so were any changes to the makefile required.

I suggest that you just try the HP-UX V10.0 port and if you don't get errors
then you are fine.  In general, the listing of a version on a port means "that
version and later versions until superceded by another port."  The HP-UX v10
ports exist because the earlier versions didn't build.

---

From: Tomas Styblo <[email-masked]>
Date: Mon, 11 Mar 2002 16:16:40 +0100

Thanks for the explanation. I understand and agree with your opinion.

> IMAP server.  

I am not in a position to be able to make such a decision, unfortunately.
Courier works quite well over NFS for us and noone is going to take the
work and possible risks associated with conversion of millions of
mailboxes to another format and another server.

-- 
Tomas Styblo
Programmer

Czech On Line, a.s.
U nakladoveho nadrazi 8,