aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ftpserver.pl52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 2756e07ca..9237a69fb 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -578,10 +578,13 @@ sub protocolsetup {
%commandfunc = (
'APPEND' => \&APPEND_imap,
'CAPABILITY' => \&CAPABILITY_imap,
+ 'CREATE' => \&CREATE_imap,
+ 'DELETE' => \&DELETE_imap,
'EXAMINE' => \&EXAMINE_imap,
'FETCH' => \&FETCH_imap,
'LIST' => \&LIST_imap,
'LOGOUT' => \&LOGOUT_imap,
+ 'RENAME' => \&RENAME_imap,
'SEARCH' => \&SEARCH_imap,
'SELECT' => \&SELECT_imap,
'STATUS' => \&STATUS_imap,
@@ -1080,6 +1083,55 @@ sub SEARCH_imap {
return 0;
}
+sub CREATE_imap {
+ my ($args) = @_;
+ fix_imap_params($args);
+
+ logmsg "CREATE_imap got $args\n";
+
+ if ($args eq "") {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ sendcontrol "$cmdid OK CREATE completed\r\n";
+ }
+
+ return 0;
+}
+
+sub DELETE_imap {
+ my ($args) = @_;
+ fix_imap_params($args);
+
+ logmsg "DELETE_imap got $args\n";
+
+ if ($args eq "") {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ sendcontrol "$cmdid OK DELETE completed\r\n";
+ }
+
+ return 0;
+}
+
+sub RENAME_imap {
+ my ($args) = @_;
+ my ($from_mailbox, $to_mailbox) = split(/ /, $args, 2);
+ fix_imap_params($from_mailbox, $to_mailbox);
+
+ logmsg "RENAME_imap got $args\n";
+
+ if (($from_mailbox eq "") || (to_mailbox eq "")) {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ sendcontrol "$cmdid OK RENAME completed\r\n";
+ }
+
+ return 0;
+}
+
sub LOGOUT_imap {
sendcontrol "* BYE cURL IMAP server signing off\r\n";
sendcontrol "$cmdid OK LOGOUT completed\r\n";