cURL / Mailing Lists / curl-library / Single Mail

curl-library

Help with the test server

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Sun, 30 Dec 2012 13:58:10 +0000

Hi all,

I am in the process of adding support to IMAP for the SASL based
authentication mechanisms that both the SMTP and POP3 protocols support.

One of the changes I need to make is adding support for the CAPABILITY
command in IMAP. This command is similar to the POP3 CAPA command with the
exception that all capabilities are listed on one line rather than over
multiple lines.

For example the following is returned from Exchange:

* CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN STARTTLS
UIDPLUS CHILDREN IDLE NAMESPACE LITERAL+

Rather than break the test server and hope that someone else fixes it up, I
have attempted to modify ftpserver.pl myself - however, it is about 12 years
since I have written any perl and not only that but I am a Windows user and
cannot run the test scripts to verify my work :(

I have attached the proposed patch, and would really appreciate it if
someone can check the modification over for me, and possibly run it, before
I commit and push it into the repository. I have based the modifications on
the work Yang Tse did earlier on in the year when he added support for the
POP3 CAPA and AUTH commands.

The responses that will generated by this modification are:

1) When the test server doesn't support capa extensions

B BAD Command

2) When the test server supports capa extensions but authentication is
disabled

* CAPABILITY IMAP4 pingpong test server
B OK CAPABILITY completed

3) When the test server supports capa extensions and authentication is
enabled

* CAPABILITY IMAP4 AUTH=UNKNOWN pingpong test server
B OK CAPABILITY completed

Obviously AUTH=UNKNOWN is a place holder just as SASL UNKNOWN is in the
CAPA_pop3 function.

Also note there is a small bug in libcurl's IMAP cmd id generation so it
starts off at B rather than A :(

Many thanks in advance

Kind Regards

Steve

Received on 2012-12-30