ftpserver.pl: Added mailbox check to IMAP SELECT handler
This commit is contained in:
parent
4ba3b6c05a
commit
e9cca79dd1
@ -844,22 +844,27 @@ sub LOGIN_imap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub SELECT_imap {
|
sub SELECT_imap {
|
||||||
my ($testno) = @_;
|
my ($mailbox) = @_;
|
||||||
fix_imap_params($testno);
|
fix_imap_params($mailbox);
|
||||||
|
|
||||||
logmsg "SELECT_imap got test $testno\n";
|
logmsg "SELECT_imap got test $mailbox\n";
|
||||||
|
|
||||||
# Example from RFC 3501, 6.3.1. SELECT Command
|
if($mailbox eq "") {
|
||||||
sendcontrol "* 172 EXISTS\r\n";
|
sendcontrol "$cmdid BAD Command Argument\r\n";
|
||||||
sendcontrol "* 1 RECENT\r\n";
|
}
|
||||||
sendcontrol "* OK [UNSEEN 12] Message 12 is first unseen\r\n";
|
else {
|
||||||
sendcontrol "* OK [UIDVALIDITY 3857529045] UIDs valid\r\n";
|
# Example from RFC 3501, 6.3.1. SELECT Command
|
||||||
sendcontrol "* OK [UIDNEXT 4392] Predicted next UID\r\n";
|
sendcontrol "* 172 EXISTS\r\n";
|
||||||
sendcontrol "* FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)\r\n";
|
sendcontrol "* 1 RECENT\r\n";
|
||||||
sendcontrol "* OK [PERMANENTFLAGS (\\Deleted \\Seen \\*)] Limited\r\n";
|
sendcontrol "* OK [UNSEEN 12] Message 12 is first unseen\r\n";
|
||||||
sendcontrol "$cmdid OK [READ-WRITE] SELECT completed\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 (\\Deleted \\Seen \\*)] Limited\r\n";
|
||||||
|
sendcontrol "$cmdid OK [READ-WRITE] SELECT completed\r\n";
|
||||||
|
|
||||||
$selected = $testno;
|
$selected = $mailbox;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user