Skip to content

Commit

Permalink
ftpserver.pl: Added support for POP STAT command
Browse files Browse the repository at this point in the history
  • Loading branch information
captain-caveman2k committed Sep 8, 2013
1 parent 18c595f commit f851df8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/ftpserver.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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!',
Expand Down Expand Up @@ -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";

Expand Down

0 comments on commit f851df8

Please sign in to comment.