mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -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') {
|
||||
%commandfunc = (
|
||||
'DATA' => \&DATA_smtp,
|
||||
'EHLO' => \&EHLO_smtp,
|
||||
'HELO' => \&HELO_smtp,
|
||||
'RCPT' => \&RCPT_smtp,
|
||||
'QUIT' => \&QUIT_smtp,
|
||||
);
|
||||
%displaytext = (
|
||||
'EHLO' => "250-SIZE\r\n250 Welcome visitor, stay a while staaaaaay forever",
|
||||
'MAIL' => '200 Note taken',
|
||||
'RCPT' => '200 Receivers accepted',
|
||||
'QUIT' => '200 byebye',
|
||||
'welcome' => join("",
|
||||
'220- _ _ ____ _ '."\r\n",
|
||||
'220- ___| | | | _ \| | '."\r\n",
|
||||
@ -787,6 +787,19 @@ sub HELO_smtp {
|
||||
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
|
||||
my @deleted;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user