From dadc495540946e3631de0be8b58183f245be9859 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sun, 15 Sep 2013 09:11:48 +0100 Subject: ftpserver.pl: Moved SMTP EHLO and QUIT handlers in own functions --- tests/ftpserver.pl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'tests') 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; -- cgit v1.2.3