curl-library
Re: POP3 empty list problem & solution + DELE command + SMTP fix
Date: Tue, 9 Aug 2011 00:35:31 +0200 (CEST)
On Tue, 12 Jul 2011, Graeme Gill wrote:
> I'm trying to use libcurl to read mail from a POP3 mailbox, and have come
> across an issue with the Curl_pop3_write() function not detecting the end of
> body marker properly.
Hi Graeme, thanks a lot for your patch and sorry for the long delay until I've
responded to it. I've inlined my response on your work below.
> For the LIST command when there are no messages, this is not the case, and
> curl_easy_perform() hangs.
Cool, this has been reported before but no fix was provided yet.
I would like to ask that you provide separate patches with only one fix in
each.
> I also needed to add the DELE command, to be able to remove mail messages
> once they have been read. Following the style of the list option, I added a
> delete option CURLOPT_DELETE to allow this.
I would like this done slightly differently. I don't think this needs a new
option (that is POP3-specific). I would like you to either use
CURLOPT_CUSTOMREQUEST and offer an alternative request than "RETR" on the
mailbox. That could then be made to send DELE instead. That way you will of
course not be able to do both RETR and DELE using the same single libcurl
call.
Optionally, the pop3 code could be made to support a "quoted" list of commands
like FTP and SFTP does, where you can provide a list of commands that gets
sent to the server. See the lib/ftp.c:ftp_sendquote() function.
In the end, I would really also like to get these changes tests in the test
suite. Any chance you can look into extending the existing rather poor and
simple POP3 tests? See tests/data/test800 to test813 something.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-08-09