aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-09-11 18:19:49 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-09-11 19:57:29 +0100
commit3f6991766f3e9f112e72802e6d36297415eaf670 (patch)
treec402524533a41f2361135e1ae6c1e4bc3d42606e /tests
parentcfe5f7dbf431eee38cde62513aab59ddfbd058c8 (diff)
ftpserver.pl: Added support for IMAP COPY command
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ftpserver.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index ac52a496c..ab514e119 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -586,6 +586,7 @@ sub protocolsetup {
'CAPABILITY' => \&CAPABILITY_imap,
'CHECK' => \&CHECK_imap,
'CLOSE' => \&CLOSE_imap,
+ 'COPY' => \&COPY_imap,
'CREATE' => \&CREATE_imap,
'DELETE' => \&DELETE_imap,
'EXAMINE' => \&EXAMINE_imap,
@@ -1239,6 +1240,23 @@ sub EXPUNGE_imap {
return 0;
}
+sub COPY_imap {
+ my ($args) = @_;
+ my ($uid, $mailbox) = split(/ /, $args, 2);
+ fix_imap_params($uid, $mailbox);
+
+ logmsg "COPY_imap got $args\n";
+
+ if (($uid eq "") || ($mailbox eq "")) {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ sendcontrol "$cmdid OK COPY completed\r\n";
+ }
+
+ return 0;
+}
+
sub LOGOUT_imap {
sendcontrol "* BYE cURL IMAP server signing off\r\n";
sendcontrol "$cmdid OK LOGOUT completed\r\n";