aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-09-08 08:37:37 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-09-08 08:49:40 +0100
commitf851df88fbd39e7ab8de0ffd51d568a461ab01c7 (patch)
tree192b347f24c1e77cd05931cd94d430c081a456db
parent18c595fde23ef7f7ca1c4c9dc733e635b80424aa (diff)
ftpserver.pl: Added support for POP STAT command
-rwxr-xr-xtests/ftpserver.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 536ea06ab..8ca3f8b8a 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -562,6 +562,7 @@ sub protocolsetup {
'LIST' => \&LIST_pop3,
'QUIT' => \&QUIT_pop3,
'RETR' => \&RETR_pop3,
+ 'STAT' => \&STAT_pop3,
);
%displaytext = (
'USER' => '+OK We are happy you popped in!',
@@ -1310,6 +1311,21 @@ sub DELE_pop3 {
return 0;
}
+sub STAT_pop3 {
+ my ($args) = @_;
+
+ if ($args ne "") {
+ sendcontrol "-ERR Protocol error\r\n";
+ }
+ else {
+ # Send statistics for the built-in fake message list as
+ # detailed in the LIST_pop3 function above
+ sendcontrol "+OK 3 4294967800\r\n";
+ }
+
+ return 0;
+}
+
sub QUIT_pop3 {
sendcontrol "+OK byebye\r\n";