ftpserver.pl: Reworked SMTP verified server detection

Following the addition of informational commands to the SMTP protocol,
the test server is no longer required to return the verified server
information in responses that curl only outputs in verbose mode.

Instead, a similar detection mechanism to that used by FTP, IMAP and
POP3 can now be used.
This commit is contained in:
Steve Holme
2013-12-27 18:12:06 +00:00
parent c9dd4022f4
commit 263616202b
2 changed files with 67 additions and 88 deletions

View File

@@ -790,14 +790,6 @@ sub verifyftp {
if($proto eq "ftps") {
$extra .= "--insecure --ftp-ssl-control ";
}
elsif($proto eq "smtp") {
# SMTP is a bit different since it requires more options and it
# has _no_ output!
$extra .= "--mail-rcpt verifiedserver ";
$extra .= "--mail-from fake\@example.com ";
$extra .= "--upload /dev/null ";
$extra .= "--stderr - "; # move stderr to parse the verbose stuff
}
my $flags = "--max-time $server_response_maxtime ";
$flags .= "--silent ";