cURL / Mailing Lists / curl-library / Single Mail


State of POP3 in curl?

From: Rich Gray <>
Date: Tue, 31 Jan 2012 10:45:14 -0500

I've done something foolish. After doing an amazingly clean implementation
of some HTTP scrapping using libcurl, I mentioned to my boss that libcurl
also does pop3. Now we have a requirement for it and I got charged with
getting a prototype going. (Or directing a co-worker to do so.) For a
prototype, we can work with the existing LIST/RETR capability. (Need to get
7.24 for the fixes it contains.)

I have been watching, with great interest, Steve Holmes's fine efforts to
round out cURL's POP3 capabilities. I'm curious as to how the effort goes.
  Last I saw was a set of patches, but haven't been able to do much other
than watch. I presume those have not been landed, if we want to test them
we'll have to build from source with them applied. Might just get there. :)

Does seem like some implementation details were still being considered and
I've been mulling over them (despite no time to post.) Let me say up front
that I'm really not picky about how it's done, these are just the
impressions of a barely initiated libcurl user. Mostly it strikes me as
strange ("hokey") to see parameters which aren't part of URL passed there.
(I do understand and agree with wildcard/globbing/sequence numbering
constructs.) The message number on the URL is not RFC. It is a function of
the command. Seems like that and the parameter for TOP should be passed
with CURLOPTs. If there's not enough justification for dedicated CURLOPTS,
maybe a CURLOPT_ARGV would be way to deal with extra parameters? Perhaps
the CURLOPT_RANGE parameter could be re-used for the TOP linecount. (Must
always start with one.) From a command line point of view, this might look

pop3:// -X RETR:1 # retrieve message number 1
pop3:// -X TOP:2:15 # retrieve 1st 15 lines from msg 2

   or perhaps with spaces between parms

pop3:// -X "RETR 1" # retrieve message number 1
pop3:// -X "TOP 2 15" # retrieve 1st 15 lines from msg 2

Using colon's avoids the need to put quotes around the -X parameters. The
space separated style does make the commands look like right out of the RFC,
don't they... Anyway, just a thought.

List admin:
Received on 2012-01-31