Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: POP-3 command TOP not supported, what to do?

From: deryk:iitowns at: 6-Feb-2001 23:03

GS Jones wrote:
> Hi, Martin, > > Here was my quick hack that version that I brewed up yesterday, but I > hesitated to send it after seeing Kevin's resubmission of Jeff's more > definitive solution. Today, I'm thinking what the heck, it works, I'll send > it anyway. > > i-buf: make string! 1002 > pop-port: open pop://USER:[PASS--pop--server--dom] > write-io pop-port "TOP 1 0" 1000 > read-io pop-port i-buf 1000 > write-io pop-port "QUIT" 1000 > print i-buf > > If you wish to see more feedback messages while tinkering, be sure to turn > on tracing with: > > trace/net on > > Just my 2 cents, which is worth 2 cents *before* inflation :-) > --Scott > ----- Original Message ----- > From: "Martin Rommel" <[Martin_Rommel--mac--com]> > To: <[rebol-list--rebol--com]> > Sent: Sunday, February 04, 2001 10:02 PM > Subject: [REBOL] POP-3 command TOP not supported, what to do? > > > Hello list, > > the implementation of the POP-3 protocol in Rebol seems not to support the > > command TOP which is used to retrieve only the header of an email from the > > server (and possibly a specified number of lines of the message, see RFC > > 1939). This is important if you have some big email sitting in your > mailbox > > and only want to know the header without downloading the whole thing. > > Why doesn't the import-email function just have a modifier to allow only > > downloading the header without the content of the message. > > I tried to write to the open port without success (I just started using > > rebol last week, but already set up a very helpful little script). > > When telnetting into a POP-3 server it is trivial, just type "TOP 1 0" and > > you get the header of the first message (with 0 lines of the content). > > How to do that in rebol? Has anybody ever tried that? > > Any help is appreciated!
(aimed at Martin) RFC1939 also states that TOP is an optional command and need not be implemented at all (Section 7). On the other side of the fence, a properly written client (protocol API in this instance) can easily check the results of an attempt at using the command, if successful, great, otherwise, a fallback to a normal scan listing could be performed. Regards, Deryk