cURL / Mailing Lists / curl-library / Single Mail

curl-library

Enhancing POP3 to support extra commands

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Thu, 1 Dec 2011 16:00:48 +0000

Dear all,

As you are probably aware, the pop3 interface is currently rather limited in
that it only supports the LIST and RETR commands. For example:

pop3://mail.domain.com - LIST (all)
pop3://mail.domain.com/3 - LIST (single) for mail 3
when OPT_DIRLISTONLY is specified ; otherwise RETR for mail 3
 
I am intending to extend this support so that the following additional POP3
commands are supported:

UIDL [msg] - Lists all messages UIDs or
a specific message's UID information
STAT - Retrieves statistics for
the connected user
TOP [msg] [rows] - Retrieves the header and
number of rows specified for the given message - rows can be zero to return
just the header part
DELE [msg] - Deletes the specified
message
RSET - Resets the connection to
its initial status (undoing any DELE commands)

I am proposing that we support both the existing commands as well as the
ones above through the following URLs:

pop3://mail.domain.com - LIST (all) maintaining
compatibility with v7.23.1
pop3://mail.domain.com/list - LIST (all)
pop3://mail.domain.com/list/3 - LIST (single) for mail 3
pop3://mail.domain.com/3 - LIST (single) for mail 3
(when OPT_DIRLISTONLY is specified) maintaining compatibility with v7.23.1

pop3://mail.domain.com/stat - STAT

pop3://mail.domain.com/top/3 - TOP (header only) for mail 3
pop3://mail.domain.com/top/3?rows=10 - TOP (header + 10 rows of body
text) for mail 3

pop3://mail.domain.com/3 - RETR for mail 3 (when
OPT_DIRLISTONLY is NOT specified) maintaining compatibility with v7.23.1
pop3://mail.domain.com/retr/3 - RETR for mail 3

pop3://mail.domain.com/dele/3 - DELE for mail 3

pop3://mail.domain.com/rset - RSET

I think style wise this is in line with the rest of libcurl and how it
handles URLs (from the documentation I have written) but I would really
appreciate any input on this before continuing.

Kind Regards

Steve

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