ftpserver.pl: Added support for LSUB command
This commit is contained in:
@@ -593,6 +593,7 @@ sub protocolsetup {
|
|||||||
'EXPUNGE' => \&EXPUNGE_imap,
|
'EXPUNGE' => \&EXPUNGE_imap,
|
||||||
'FETCH' => \&FETCH_imap,
|
'FETCH' => \&FETCH_imap,
|
||||||
'LIST' => \&LIST_imap,
|
'LIST' => \&LIST_imap,
|
||||||
|
'LSUB' => \&LSUB_imap,
|
||||||
'LOGOUT' => \&LOGOUT_imap,
|
'LOGOUT' => \&LOGOUT_imap,
|
||||||
'RENAME' => \&RENAME_imap,
|
'RENAME' => \&RENAME_imap,
|
||||||
'SEARCH' => \&SEARCH_imap,
|
'SEARCH' => \&SEARCH_imap,
|
||||||
@@ -1041,6 +1042,40 @@ sub LIST_imap {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub LSUB_imap {
|
||||||
|
my ($args) = @_;
|
||||||
|
my ($reference, $mailbox) = split(/ /, $args, 2);
|
||||||
|
fix_imap_params($reference, $mailbox);
|
||||||
|
|
||||||
|
logmsg "LSUB_imap got $args\n";
|
||||||
|
|
||||||
|
if ($reference eq "") {
|
||||||
|
sendcontrol "$cmdid BAD Command Argument\r\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
my $testno = $reference;
|
||||||
|
|
||||||
|
$testno =~ s/^([^0-9]*)//;
|
||||||
|
my $testpart = "";
|
||||||
|
if ($testno > 10000) {
|
||||||
|
$testpart = $testno % 10000;
|
||||||
|
$testno = int($testno / 10000);
|
||||||
|
}
|
||||||
|
|
||||||
|
loadtest("$srcdir/data/test$testno");
|
||||||
|
|
||||||
|
my @data = getpart("reply", "data$testpart");
|
||||||
|
|
||||||
|
for my $d (@data) {
|
||||||
|
sendcontrol $d;
|
||||||
|
}
|
||||||
|
|
||||||
|
sendcontrol "$cmdid OK LSUB Completed\r\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
sub EXAMINE_imap {
|
sub EXAMINE_imap {
|
||||||
my ($testno) = @_;
|
my ($testno) = @_;
|
||||||
fix_imap_params($testno);
|
fix_imap_params($testno);
|
||||||
|
|||||||
Reference in New Issue
Block a user