mirror of
https://github.com/moparisthebest/curl
synced 2025-01-08 12:28:06 -05:00
ftpserver.pl: Moved SMTP EHLO and QUIT handlers in own functions
This commit is contained in:
parent
eae86ba62d
commit
dadc495540
@ -623,14 +623,14 @@ sub protocolsetup {
|
|||||||
elsif($proto eq 'smtp') {
|
elsif($proto eq 'smtp') {
|
||||||
%commandfunc = (
|
%commandfunc = (
|
||||||
'DATA' => \&DATA_smtp,
|
'DATA' => \&DATA_smtp,
|
||||||
|
'EHLO' => \&EHLO_smtp,
|
||||||
'HELO' => \&HELO_smtp,
|
'HELO' => \&HELO_smtp,
|
||||||
'RCPT' => \&RCPT_smtp,
|
'RCPT' => \&RCPT_smtp,
|
||||||
|
'QUIT' => \&QUIT_smtp,
|
||||||
);
|
);
|
||||||
%displaytext = (
|
%displaytext = (
|
||||||
'EHLO' => "250-SIZE\r\n250 Welcome visitor, stay a while staaaaaay forever",
|
|
||||||
'MAIL' => '200 Note taken',
|
'MAIL' => '200 Note taken',
|
||||||
'RCPT' => '200 Receivers accepted',
|
'RCPT' => '200 Receivers accepted',
|
||||||
'QUIT' => '200 byebye',
|
|
||||||
'welcome' => join("",
|
'welcome' => join("",
|
||||||
'220- _ _ ____ _ '."\r\n",
|
'220- _ _ ____ _ '."\r\n",
|
||||||
'220- ___| | | | _ \| | '."\r\n",
|
'220- ___| | | | _ \| | '."\r\n",
|
||||||
@ -787,6 +787,19 @@ sub HELO_smtp {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub EHLO_smtp {
|
||||||
|
sendcontrol "250-SIZE\r\n";
|
||||||
|
sendcontrol "250 Welcome visitor, stay a while staaaaaay forever\r\n";
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub QUIT_smtp {
|
||||||
|
sendcontrol "200 byebye";
|
||||||
|
|
||||||
|
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…
Reference in New Issue
Block a user