diff options
author | Steve Holme <steve_holme@hotmail.com> | 2013-09-15 09:11:48 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-09-15 09:20:53 +0100 |
commit | dadc495540946e3631de0be8b58183f245be9859 (patch) | |
tree | 6d7339b8c1ee39a79697913f523ddef08d8f4df9 | |
parent | eae86ba62dadecc8fc9ef7ae4fc5f3a8439496e9 (diff) |
ftpserver.pl: Moved SMTP EHLO and QUIT handlers in own functions
-rwxr-xr-x | tests/ftpserver.pl | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 15d00f08f..be8dea047 100755 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -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; |