9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] I still dont understand...
@ 2001-07-16 20:39 David Gordon Hogan
  2001-07-17  0:55 ` Boyd Roberts
  0 siblings, 1 reply; 9+ messages in thread
From: David Gordon Hogan @ 2001-07-16 20:39 UTC (permalink / raw)
  To: 9fans

> i assume it issues a STAT.  this is how you do it in limbo:

Nope, it goes straight ahead and issues a UIDL.  Unfortunately
empty mailboxes are a special case (stupid protocol).  I know
how to fix this, I just haven't done it yet.



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

* Re: [9fans] I still dont understand...
  2001-07-16 20:39 [9fans] I still dont understand David Gordon Hogan
@ 2001-07-17  0:55 ` Boyd Roberts
  0 siblings, 0 replies; 9+ messages in thread
From: Boyd Roberts @ 2001-07-17  0:55 UTC (permalink / raw)
  To: 9fans

From: "David Gordon Hogan" <dhog@plan9.bell-labs.com>
> Nope, it goes straight ahead and issues a UIDL.  Unfortunately
> empty mailboxes are a special case (stupid protocol).  I know
> how to fix this, I just haven't done it yet.

very bad move -- human.  when i wrote my client in C (and later in
limbo) i took on board the advice 'be conservative in what you send'.




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

* Re: [9fans] I still dont understand...
@ 2001-07-16 20:33 David Gordon Hogan
  0 siblings, 0 replies; 9+ messages in thread
From: David Gordon Hogan @ 2001-07-16 20:33 UTC (permalink / raw)
  To: 9fans

> This doesnt work ,its now it fails... ie , this
>
> if((fd = open(buf, OREAD)) < 0)
>
> I have allredy tried that

Note that there are two changes in that pair of lines: the OREAD
change, and the change of the pathname from /mnt/auth/pop3/%s/%s
to /mnt/auth/pop/%s/%s.  While agent lets you call it "pop" or "pop3"
(or whatever you like) the sample config file uses "pop", and it seemed
more consistent to have "pop" or "apop", not "pop3" or "apop".

So make sure that the file it is trying to open actually exists...



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

* Re: [9fans] I still dont understand...
  2001-07-16 19:53 David Gordon Hogan
  2001-07-16 19:58 ` Michael Grunditz
@ 2001-07-16 20:04 ` Boyd Roberts
  2001-07-16 20:00   ` Michael Grunditz
  1 sibling, 1 reply; 9+ messages in thread
From: Boyd Roberts @ 2001-07-16 20:04 UTC (permalink / raw)
  To: 9fans

From: "David Gordon Hogan" <dhog@plan9.bell-labs.com>
> Note that there is another bug -- upas/fs
> will die if your POP mbox has 0 messages.  I haven't got
> around to fixing that.

can't be too hard to fix.

i assume it issues a STAT.  this is how you do it in limbo:

-     (e, s) = request(CMD_STAT, nil);
-	case e {
-	ERR =>
-		return(s, big 0);
-	OK =>
-		if (debug)
-			sys->print("%s\n", s);
-	}
-
-	messages := big 0;
-	size := big 0;
-	(n, l) := sys->tokenize(s, " ");
-	case n {
-	1 =>
-		sys->print("%d message%s for '%s@%s', maildrop size unknown.\n", int messages, plural(messages), user, host);
-		messages = big hd l;
-
-	2 =>
-		messages = big hd l;
-		size = big hd tl l;
-
-	* =>
-		return (sys->sprint("unknown number of messages for '%s@%s'.\n", user, host), big 0);
-	}

then loop over messages.




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

* Re: [9fans] I still dont understand...
  2001-07-16 19:58 ` Michael Grunditz
@ 2001-07-16 20:02   ` Michael Grunditz
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Grunditz @ 2001-07-16 20:02 UTC (permalink / raw)
  To: 9fans

again..

What I wanted to say was that I allready worked around those two bugs..

/Michael
----- Original Message -----
From: "Michael Grunditz" <micken@privat.utfors.se>
To: <9fans@cse.psu.edu>
Sent: Monday, July 16, 2001 9:58 PM
Subject: Re: [9fans] I still dont understand...


> But .. comments in source
>
> /Michael
> ----- Original Message -----
> From: "David Gordon Hogan" <dhog@plan9.bell-labs.com>
> To: <9fans@cse.psu.edu>
> Sent: Monday, July 16, 2001 9:53 PM
> Subject: Re: [9fans] I still dont understand...
>
>
> > There are some bugs in the upas/fs plaintext POP implementation, which
> > probably weren't detected because upas/fs insists on APOP if the server
> > supports it.  Here's a patch for them.  Note that there is another
bug --
> upas/fs
> > will die if your POP mbox has 0 messages.  I haven't got around to
fixing
> that.
> >
> > /n/dump/2001/0716/sys/src/cmd/upas/fs/pop3.c:132,133 c
> /n/dump/2001/0705/sys/src/cmd/upas/fs/pop3.c:132,133
> > < sprint(buf, "/mnt/auth/pop/%s/%s", pop->host, pop->user);
> > < if((fd = open(buf, OREAD)) < 0)
>
>
> This doesnt work ,its now it fails... ie , this
>
> if((fd = open(buf, OREAD)) < 0)
>
> I have allredy tried that
>
> > ---
> > > sprint(buf, "/mnt/auth/pop3/%s/%s", pop->host, pop->user);
> > > if((fd = open(buf, ORDWR)) < 0)
> > /n/dump/2001/0716/sys/src/cmd/upas/fs/pop3.c:469 c
> /n/dump/2001/0705/sys/src/cmd/upas/fs/pop3.c:469
> > < int nf, ppop;
> > ---
> > > int nf;
> > /n/dump/2001/0716/sys/src/cmd/upas/fs/pop3.c:472,473 c
> /n/dump/2001/0705/sys/src/cmd/upas/fs/pop3.c:472
> > < ppop = strncmp(path, "/pop/", 5) == 0;
> > < if(!ppop && strncmp(path, "/apop/", 6) != 0)
> > ---
> > > if(strncmp(path, "/pop/", 5) != 0 && strncmp(path, "/apop/", 6) != 0)
> > /n/dump/2001/0716/sys/src/cmd/upas/fs/pop3.c:491 c
> /n/dump/2001/0705/sys/src/cmd/upas/fs/pop3.c:490,491
> > < pop->ppop = ppop;
> > ---
> > > if(strncmp(path, "/pop/", 5) == 0)
> > > pop->ppop = 1;
> >
>
>
> This doesnt fail here ..
>



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

* Re: [9fans] I still dont understand...
  2001-07-16 20:04 ` Boyd Roberts
@ 2001-07-16 20:00   ` Michael Grunditz
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Grunditz @ 2001-07-16 20:00 UTC (permalink / raw)
  To: 9fans

I agree , I will try that if I get the first things to go well... :)

/Michael
----- Original Message -----
From: "Boyd Roberts" <boyd@fr.inter.net>
To: <9fans@cse.psu.edu>
Sent: Monday, July 16, 2001 10:04 PM
Subject: Re: [9fans] I still dont understand...


> From: "David Gordon Hogan" <dhog@plan9.bell-labs.com>
> > Note that there is another bug -- upas/fs
> > will die if your POP mbox has 0 messages.  I haven't got
> > around to fixing that.
>
> can't be too hard to fix.
>
> i assume it issues a STAT.  this is how you do it in limbo:
>
> -     (e, s) = request(CMD_STAT, nil);
> - case e {
> - ERR =>
> - return(s, big 0);
> - OK =>
> - if (debug)
> - sys->print("%s\n", s);
> - }
> -
> - messages := big 0;
> - size := big 0;
> - (n, l) := sys->tokenize(s, " ");
> - case n {
> - 1 =>
> - sys->print("%d message%s for '%s@%s', maildrop size unknown.\n", int
messages, plural(messages), user, host);
> - messages = big hd l;
> -
> - 2 =>
> - messages = big hd l;
> - size = big hd tl l;
> -
> - * =>
> - return (sys->sprint("unknown number of messages for '%s@%s'.\n", user,
host), big 0);
> - }
>
> then loop over messages.
>
>



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

* Re: [9fans] I still dont understand...
  2001-07-16 19:53 David Gordon Hogan
@ 2001-07-16 19:58 ` Michael Grunditz
  2001-07-16 20:02   ` Michael Grunditz
  2001-07-16 20:04 ` Boyd Roberts
  1 sibling, 1 reply; 9+ messages in thread
From: Michael Grunditz @ 2001-07-16 19:58 UTC (permalink / raw)
  To: 9fans

But .. comments in source

/Michael
----- Original Message -----
From: "David Gordon Hogan" <dhog@plan9.bell-labs.com>
To: <9fans@cse.psu.edu>
Sent: Monday, July 16, 2001 9:53 PM
Subject: Re: [9fans] I still dont understand...


> There are some bugs in the upas/fs plaintext POP implementation, which
> probably weren't detected because upas/fs insists on APOP if the server
> supports it.  Here's a patch for them.  Note that there is another bug --
upas/fs
> will die if your POP mbox has 0 messages.  I haven't got around to fixing
that.
>
> /n/dump/2001/0716/sys/src/cmd/upas/fs/pop3.c:132,133 c
/n/dump/2001/0705/sys/src/cmd/upas/fs/pop3.c:132,133
> < sprint(buf, "/mnt/auth/pop/%s/%s", pop->host, pop->user);
> < if((fd = open(buf, OREAD)) < 0)


This doesnt work ,its now it fails... ie , this

if((fd = open(buf, OREAD)) < 0)

I have allredy tried that

> ---
> > sprint(buf, "/mnt/auth/pop3/%s/%s", pop->host, pop->user);
> > if((fd = open(buf, ORDWR)) < 0)
> /n/dump/2001/0716/sys/src/cmd/upas/fs/pop3.c:469 c
/n/dump/2001/0705/sys/src/cmd/upas/fs/pop3.c:469
> < int nf, ppop;
> ---
> > int nf;
> /n/dump/2001/0716/sys/src/cmd/upas/fs/pop3.c:472,473 c
/n/dump/2001/0705/sys/src/cmd/upas/fs/pop3.c:472
> < ppop = strncmp(path, "/pop/", 5) == 0;
> < if(!ppop && strncmp(path, "/apop/", 6) != 0)
> ---
> > if(strncmp(path, "/pop/", 5) != 0 && strncmp(path, "/apop/", 6) != 0)
> /n/dump/2001/0716/sys/src/cmd/upas/fs/pop3.c:491 c
/n/dump/2001/0705/sys/src/cmd/upas/fs/pop3.c:490,491
> < pop->ppop = ppop;
> ---
> > if(strncmp(path, "/pop/", 5) == 0)
> > pop->ppop = 1;
>


This doesnt fail here ..



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

* Re: [9fans] I still dont understand...
@ 2001-07-16 19:53 David Gordon Hogan
  2001-07-16 19:58 ` Michael Grunditz
  2001-07-16 20:04 ` Boyd Roberts
  0 siblings, 2 replies; 9+ messages in thread
From: David Gordon Hogan @ 2001-07-16 19:53 UTC (permalink / raw)
  To: 9fans

There are some bugs in the upas/fs plaintext POP implementation, which
probably weren't detected because upas/fs insists on APOP if the server
supports it.  Here's a patch for them.  Note that there is another bug -- upas/fs
will die if your POP mbox has 0 messages.  I haven't got around to fixing that.

/n/dump/2001/0716/sys/src/cmd/upas/fs/pop3.c:132,133 c /n/dump/2001/0705/sys/src/cmd/upas/fs/pop3.c:132,133
< 		sprint(buf, "/mnt/auth/pop/%s/%s", pop->host, pop->user);
< 		if((fd = open(buf, OREAD)) < 0)
---
> 		sprint(buf, "/mnt/auth/pop3/%s/%s", pop->host, pop->user);
> 		if((fd = open(buf, ORDWR)) < 0)
/n/dump/2001/0716/sys/src/cmd/upas/fs/pop3.c:469 c /n/dump/2001/0705/sys/src/cmd/upas/fs/pop3.c:469
< 	int nf, ppop;
---
> 	int nf;
/n/dump/2001/0716/sys/src/cmd/upas/fs/pop3.c:472,473 c /n/dump/2001/0705/sys/src/cmd/upas/fs/pop3.c:472
< 	ppop = strncmp(path, "/pop/", 5) == 0;
< 	if(!ppop && strncmp(path, "/apop/", 6) != 0)
---
> 	if(strncmp(path, "/pop/", 5) != 0 && strncmp(path, "/apop/", 6) != 0)
/n/dump/2001/0716/sys/src/cmd/upas/fs/pop3.c:491 c /n/dump/2001/0705/sys/src/cmd/upas/fs/pop3.c:490,491
< 	pop->ppop = ppop;
---
> 	if(strncmp(path, "/pop/", 5) == 0)
> 		pop->ppop = 1;



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

* [9fans] I still dont understand...
@ 2001-07-16 19:33 Michael Grunditz
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Grunditz @ 2001-07-16 19:33 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]

Now pop3 again...

1. I run agent
2. I copy my correct config to /mnt/auth and the correct directories apear
3. I run upas/fs -f /pop/mailserver/user
3. First , I "got no APOP hdr from server" , I commented out that section that didnt allow plaintext
3. retry upas/fs
4. "authentication agent failed", "if((fd = open(buf, ORDWR)) < 0)" fails.
5. agent wites by default r r r but the open call wants something else , so I changed the permissions in agent.c.
6 rerun agent , copy config , permissions changed.
7. still "authentication agent failed"..

so now what ?

/Michael Grunditz

[-- Attachment #2: Type: text/html, Size: 1386 bytes --]

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

end of thread, other threads:[~2001-07-17  0:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-16 20:39 [9fans] I still dont understand David Gordon Hogan
2001-07-17  0:55 ` Boyd Roberts
  -- strict thread matches above, loose matches on Subject: below --
2001-07-16 20:33 David Gordon Hogan
2001-07-16 19:53 David Gordon Hogan
2001-07-16 19:58 ` Michael Grunditz
2001-07-16 20:02   ` Michael Grunditz
2001-07-16 20:04 ` Boyd Roberts
2001-07-16 20:00   ` Michael Grunditz
2001-07-16 19:33 Michael Grunditz

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).