From 3f6991766f3e9f112e72802e6d36297415eaf670 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Wed, 11 Sep 2013 18:19:49 +0100 Subject: ftpserver.pl: Added support for IMAP COPY command --- tests/ftpserver.pl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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' => \©_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"; -- cgit v1.2.3