in reply to Checking SMTP ports.

If you want you can use Net::Telnet. Check the port and see if you get a 2xx back from the server.

If the request was sucessful each line should be prepended by a 2xx status code and SMTP in the line.

$line =~ /^2\d\d .*SMTP/ should work as a rudimentary test for the first line back.

Update:

use strict; use warnings; use Net::Telnet; my $tel = Net::Telnet->new(-host => 'localhost', -port => 25, -errmode + => 'return') or die "Port not available\n"; my $rtn = $tel->getline() or die "No Reponse\n"; print $rtn =~ /^2\d\d .*SMTP/ ? 'OK' : 'Fail';


grep
Mynd you, mønk bites Kan be pretti nasti...