cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: [PATCH] POP3: Expanded the supported commands

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Sat, 31 Mar 2012 19:09:38 +0100

Hi Guys,

On Tue, Mar 27 2012, Steve Holme wrote:

> I am now in a position to post my changes, however, as I have already
> pushed some of the code tidy ups and simplifications this weekend
> the final changes aren't that complicated.
>
> In summary I have:
>
> * Added a variable to pop_conn called custom to hold the contents of
> the parsed custom request setting "str[STRING_CUSTOMREQUEST]".
> * Added a function to parse the above contents as
> pop3_parse_custom_request().
> * Modified the pop3_list() and pop3_retr() functions to send the
> custom request if it has been set. For example in pop3_retr():
>
> If nobody has any issues with this approach I will commit and push the
> changes over the next few days.

I've just pushed my changes as commit 761c3c544623cd.

Furthermore I have been playing around with the code and I think I can
further reduce it down to a single send function and a single generic
response handler as we talked about a few months ago.

However, I am fearful of breaking the test harnesses so don't want to push
these changes yet. As I don't have the ability to run the test harnesses
(being a pure Windows system here) is anyone able to help me out and run a
patch through them?

Additionally, if anyone is interested in running the dev version of curl
with the new support for additional commands the following may be useful:

Using LIST Logic

LIST ALL
--url pop3://mail.domain.com
--url pop3://mail.domain.com -X LIST

LIST SINGLE
--url pop3://mail.domain.com/1 -l
--url pop3://mail.domain.com/1 -X LIST -l
--url pop3://mail.domain.com/1 -X LIST -I

UIDL ALL
--url pop3://mail.domain.com -X UIDL

UIDL SINGLE
--url pop3://mail.domain.com/1 -X UIDL -l
--url pop3://mail.domain.com/1 -X UIDL -I

CAPA
--url pop3://mail.domain.com -X CAPA

STAT
--url pop3://mail.domain.com -X CAPA -I

NOOP
--url pop3://mail.domain.com -X NOOP -I

DELE
--url pop3://mail.domain.com -X "DELE 1" -I

RETR
--url pop3://mail.domain.com -X "RETR 1"

TOP
--url pop3://mail.domain.com -X "TOP 1 0"

Using RETR Logic

RETR
--url pop3://mail.domain.com/1
--url pop3://mail.domain.com/1 -X RETR

DELE
--url pop3://mail.domain.com -X DELE -I

Please note that some of the above use the -I (sounds like eye) which is the
same as --head whilst others use -l (sounds like hell without the h) which
is the same as --list-only but may look the same depending on the font you
use to view your emails. If it does look the same I would recommend you copy
the above command line examples into your favourite text editor ;-)

Kind Regards

Steve
 

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-01