aboutsummaryrefslogtreecommitdiff
path: root/tests/ftpserver.pl
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-09-14 10:44:21 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-09-14 10:44:54 +0100
commit4f4dc5832d5831eec64fe7dd605e1f24bc555a30 (patch)
tree7f5e5182dd5ff0d2d6d7c32df998ef1918fc0962 /tests/ftpserver.pl
parentfbcefc0ce0cbe14c5f75d8c4ca2be9cdfce3e4d3 (diff)
ftpserver.pl: Added support for IMAP NOOP command
Diffstat (limited to 'tests/ftpserver.pl')
-rwxr-xr-xtests/ftpserver.pl24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 800aa979d..6f099b105 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -595,6 +595,7 @@ sub protocolsetup {
'LIST' => \&LIST_imap,
'LSUB' => \&LSUB_imap,
'LOGOUT' => \&LOGOUT_imap,
+ 'NOOP' => \&NOOP_imap,
'RENAME' => \&RENAME_imap,
'SEARCH' => \&SEARCH_imap,
'SELECT' => \&SELECT_imap,
@@ -1331,6 +1332,29 @@ sub UID_imap {
return 0;
}
+sub NOOP_imap {
+ my ($args) = @_;
+ my @data = (
+ "* 22 EXPUNGE\r\n",
+ "* 23 EXISTS\r\n",
+ "* 3 RECENT\r\n",
+ "* 14 FETCH (FLAGS (\\Seen \\Deleted))\r\n",
+ );
+
+ if ($args) {
+ sendcontrol "$cmdid BAD Command Argument\r\n";
+ }
+ else {
+ for my $d (@data) {
+ sendcontrol $d;
+ }
+
+ sendcontrol "$cmdid OK NOOP completed\r\n";
+ }
+
+ return 0;
+}
+
sub LOGOUT_imap {
sendcontrol "* BYE cURL IMAP server signing off\r\n";
sendcontrol "$cmdid OK LOGOUT completed\r\n";