aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-09-11 18:07:25 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-09-11 18:11:33 +0100
commit5840c918d5393876c651b32e875970613c95775d (patch)
tree9aadfc02d52c3e595b9f473921daf1c28ca517e1
parentb0afb000009276c37ffef960b929779f4e86e850 (diff)
ftpserver.pl: Added support for POP3 RSET command
-rwxr-xr-xtests/ftpserver.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 1c63a308e..9c4d15372 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -563,6 +563,7 @@ sub protocolsetup {
'NOOP' => \&NOOP_pop3,
'QUIT' => \&QUIT_pop3,
'RETR' => \&RETR_pop3,
+ 'RSET' => \&RSET_pop3,
'STAT' => \&STAT_pop3,
'TOP' => \&TOP_pop3,
'UIDL' => \&UIDL_pop3,
@@ -1456,6 +1457,25 @@ sub TOP_pop3 {
return 0;
}
+sub RSET_pop3 {
+ my ($args) = @_;
+
+ if ($args) {
+ sendcontrol "-ERR Protocol error\r\n";
+ }
+ else {
+ if (@deleted) {
+ logmsg "resetting @deleted message(s)\n";
+
+ @deleted = ();
+ }
+
+ sendcontrol "+OK\r\n";
+ }
+
+ return 0;
+}
+
sub QUIT_pop3 {
if(@deleted) {
logmsg "deleting @deleted message(s)\n";