ftpserver.pl: Added support for SMTP HELO command
...and updated test902 as explicit HELO response is no longer required.
This commit is contained in:
parent
e9cca79dd1
commit
eae86ba62d
@ -12,7 +12,6 @@ RFC821
|
|||||||
<reply>
|
<reply>
|
||||||
<servercmd>
|
<servercmd>
|
||||||
REPLY EHLO 500 Command unrecognized
|
REPLY EHLO 500 Command unrecognized
|
||||||
REPLY HELO 250 Already old but still servicing...
|
|
||||||
</servercmd>
|
</servercmd>
|
||||||
</reply>
|
</reply>
|
||||||
|
|
||||||
|
@ -623,6 +623,7 @@ sub protocolsetup {
|
|||||||
elsif($proto eq 'smtp') {
|
elsif($proto eq 'smtp') {
|
||||||
%commandfunc = (
|
%commandfunc = (
|
||||||
'DATA' => \&DATA_smtp,
|
'DATA' => \&DATA_smtp,
|
||||||
|
'HELO' => \&HELO_smtp,
|
||||||
'RCPT' => \&RCPT_smtp,
|
'RCPT' => \&RCPT_smtp,
|
||||||
);
|
);
|
||||||
%displaytext = (
|
%displaytext = (
|
||||||
@ -772,6 +773,20 @@ sub RCPT_smtp {
|
|||||||
$smtp_rcpt = $args;
|
$smtp_rcpt = $args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub HELO_smtp {
|
||||||
|
my ($client) = @_;
|
||||||
|
|
||||||
|
# TODO: Get the IP address of the client connection to use in the HELO
|
||||||
|
# response when the client doesn't specify one but for now use 127.0.0.1
|
||||||
|
if (!$client) {
|
||||||
|
$client = "[127.0.0.1]";
|
||||||
|
}
|
||||||
|
|
||||||
|
sendcontrol "250 SMTP pingpong test server Hello $client\r\n";
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
# What was deleted by IMAP STORE / POP3 DELE commands
|
# What was deleted by IMAP STORE / POP3 DELE commands
|
||||||
my @deleted;
|
my @deleted;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user