aboutsummaryrefslogtreecommitdiff
path: root/tests/ftpserver.pl
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-03-14 22:49:57 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-03-14 22:49:57 +0000
commitb50285d751855440252904c76995b6de193c2dc2 (patch)
tree6ac569538a3d862babb45a9f9e22595dd4eeeff8 /tests/ftpserver.pl
parent001e664ff7eb8d06c56b42f8aa5a68227192ec1c (diff)
ftpserver.pl: Added EXAMINE_imap() for IMAP EXAMINE commands
Used hard coded data from RFC-3501 section 6.3.2.
Diffstat (limited to 'tests/ftpserver.pl')
-rwxr-xr-xtests/ftpserver.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 7900dcdba..23af6f85f 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -581,6 +581,7 @@ sub protocolsetup {
%commandfunc = (
'APPEND' => \&APPEND_imap,
'CAPABILITY' => \&CAPABILITY_imap,
+ 'EXAMINE' => \&EXAMINE_imap,
'FETCH' => \&FETCH_imap,
'LIST' => \&LIST_imap,
'SELECT' => \&SELECT_imap,
@@ -989,6 +990,25 @@ sub LIST_imap {
return 0;
}
+sub EXAMINE_imap {
+ my ($testno) = @_;
+ fix_imap_params($testno);
+
+ logmsg "EXAMINE_imap got test $testno\n";
+
+ # Example from RFC 3501, 6.3.2. EXAMINE Command
+ sendcontrol "* 17 EXISTS\r\n";
+ sendcontrol "* 2 RECENT\r\n";
+ sendcontrol "* OK [UNSEEN 8] Message 8 is first unseen\r\n";
+ sendcontrol "* OK [UIDVALIDITY 3857529045] UIDs valid\r\n";
+ sendcontrol "* OK [UIDNEXT 4392] Predicted next UID\r\n";
+ sendcontrol "* FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)\r\n";
+ sendcontrol "* OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n";
+ sendcontrol "$cmdid OK [READ-ONLY] EXAMINE completed\r\n";
+
+ return 0;
+}
+
################
################ POP3 commands
################