aboutsummaryrefslogtreecommitdiff
path: root/tests/ftpserver.pl
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-08-31 18:29:15 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-08-31 18:40:46 +0100
commit497775024c4c2a670b791ef3ac11e94fb50e387b (patch)
tree913968f27fbfc12e536025955046dde671781332 /tests/ftpserver.pl
parentea38a70539e85c3eeacae8ae72c9de4fa8ef6392 (diff)
ftpserver.pl: Added support for the IMAP CHECK command
Diffstat (limited to 'tests/ftpserver.pl')
-rwxr-xr-xtests/ftpserver.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 489c3f141..f3c84942a 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -578,6 +578,7 @@ sub protocolsetup {
%commandfunc = (
'APPEND' => \&APPEND_imap,
'CAPABILITY' => \&CAPABILITY_imap,
+ 'CHECK' => \&CHECK_imap,
'CREATE' => \&CREATE_imap,
'DELETE' => \&DELETE_imap,
'EXAMINE' => \&EXAMINE_imap,
@@ -1162,6 +1163,17 @@ sub RENAME_imap {
return 0;
}
+sub CHECK_imap {
+ if ($selected eq "") {
+ sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
+ }
+ else {
+ sendcontrol "$cmdid OK CHECK completed\r\n";
+ }
+
+ return 0;
+}
+
sub LOGOUT_imap {
sendcontrol "* BYE cURL IMAP server signing off\r\n";
sendcontrol "$cmdid OK LOGOUT completed\r\n";