9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] upas/fs -f/imap & Courier
@ 2002-02-06 13:11 Matt H
  2002-02-06 15:11 ` [9fans] upas/fs -f/imap & Courier - SOLVED Matt H
  0 siblings, 1 reply; 3+ messages in thread
From: Matt H @ 2002-02-06 13:11 UTC (permalink / raw)
  To: 9fans

Well I eventually got it to log in OK

this bit relies on the text output of the OK message from the IMAP server which is imlpementation dependent and not part of the spec (see the OK line below for what Courier outputs)

272c276,277
< 	if(!isokay(s) || strstr(s, "IMAP4")==0)
> 	if(!isokay(s) || strstr(s, "IMAP")==0)

However even when I got it to log in it failed reading (debug output below)

it ran out of lines to read and ended returning Eio ("i/o error") in this routine

static char*
imap4resp(Imap *imap)
{
	char *line, *p, *ep, *q, *r, *verb;
	int n;

	while(p = Brdline(&imap->b, '\n')){
		.. snip
	}

	return Eio;
}



 <- * OK Courier-IMAP ready. Copyright 1998-2001 Double Precision, Inc.  See COPYING for distribution information.
-> 9x1 LOGIN matt $PASSWORD
<- 9x1 OK LOGIN Ok.
-> 9x2 SELECT Inbox
<- * FLAGS (\Answered \Flagged \Deleted \Seen \Recent)
<- * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen)] Limited
<- * 59 EXISTS
<- * 0 RECENT
<- * OK [UIDVALIDITY 1010939472] Ok
<- 9x2 OK [READ-WRITE] Ok
-> 9x3 STATUS Inbox (MESSAGES UIDVALIDITY)
<- * STATUS "Inbox" (MESSAGES 59 UIDVALIDITY 1010939472)
<- 9x3 OK STATUS Completed.
-> 9x4 UID FETCH 352 RFC822.SIZE
<- * 2 FETCH (UID 352 RFC822.SIZE 1749)
<- 9x4 OK FETCH completed.
-> 9x5 UID FETCH 352 RFC822.HEADER
<- * 2 FETCH (UID 352 RFC822.HEADER {1305}
<- 9x5 OK FETCH completed.
-> 9x6 UID FETCH 352 RFC822.TEXT
<- * 2 FETCH (UID 352 RFC822.TEXT {444}
<- 9x6 OK FETCH completed.
download 398: error in initial handshake
download 399: error in initial handshake
download 401: error in initial handshake
..
..
one for each message in my Inbox!





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] upas/fs -f/imap & Courier - SOLVED
  2002-02-06 13:11 [9fans] upas/fs -f/imap & Courier Matt H
@ 2002-02-06 15:11 ` Matt H
  2002-02-06 17:01   ` Lyndon Nerenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Matt H @ 2002-02-06 15:11 UTC (permalink / raw)
  To: 9fans


Courier has a setting for maximum connections per IP, I had it set to the default(4)
I bumped it up and now it's working just fine

in file : /usr/local/etc/courier-imap/imapd
MAXPERIP=40

here's the diffs again because I noticed my comments were bumping the line numbers :
/sys/src/cmd/upas/fs/imap4.c


272c272
< 	if(!isokay(s) || strstr(s, "IMAP4")==0)
---
> 	if(!isokay(s) || strstr(s, "IMAP")==0)


275c275
< 	snprint(buf, sizeof buf, "/mnt/auth/imap/%s/%s", imap->host, imap->user);
---
> 	snprint(buf, sizeof buf, "/usr/matt/imappw/%s", imap->host);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] upas/fs -f/imap & Courier - SOLVED
  2002-02-06 15:11 ` [9fans] upas/fs -f/imap & Courier - SOLVED Matt H
@ 2002-02-06 17:01   ` Lyndon Nerenberg
  0 siblings, 0 replies; 3+ messages in thread
From: Lyndon Nerenberg @ 2002-02-06 17:01 UTC (permalink / raw)
  To: 9fans

 272c272
 < 	if(!isokay(s) || strstr(s, "IMAP4")==0)
 ---
 > 	if(!isokay(s) || strstr(s, "IMAP")==0)

This test (in either form) is just plain wrong and should be
removed. There is no requirement for the string IMAP to
appear anywhere in the greeting:

greeting        ::= "*" SPACE (resp_cond_auth / resp_cond_bye) CRLF

resp_cond_auth  ::= ("OK" / "PREAUTH") SPACE resp_text
                    ;; Authentication condition

resp_cond_bye   ::= "BYE" SPACE resp_text

resp_text       ::= ["[" resp_text_code "]" SPACE] (text_mime2 / text)
                    ;; text SHOULD NOT begin with "[" or "="

--lyndon


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-02-06 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-06 13:11 [9fans] upas/fs -f/imap & Courier Matt H
2002-02-06 15:11 ` [9fans] upas/fs -f/imap & Courier - SOLVED Matt H
2002-02-06 17:01   ` Lyndon Nerenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).