Logo
  • Home
  • About
  • Services
  • Blogs
  • Career
  • Contact
Logo

The UK's #1 Software Development Company. PodTech IO builds custom software solutions for businesses. Call today for a free consultation

  • Address

    4th Floor, 4 Tabernacle Street London EC2A 4LU
  • Email

    info@podtech.com
  • Contact

    +44 (0) 20 8720 6583

Server Port Check – Net::Telnet, check remote mail server is up and online

  • Home
  • Server Port Check – Net::Telnet, check remote mail server is up and online
  • By podtech
  • In Perl

Server Port Check – Net::Telnet, check remote mail server is up and online

This is pretty useful for checking that a server is accepting requests on a specific port.

In this case, i am checking port 25, but can be used for others.

./smtp_check.pl <host> <host> <host>

[perl]

use Data::Dumper;
use Net::SMTP;

my @all_emails = @ARGV;

foreach $email (@all_emails)
{
$response= check_domain($email);
print “$email ::: $response\n”;
}

sub check_domain($)
{
my $domain = shift;
use Net::Telnet;

$smtp = Net::Telnet->new(
Host=>$domain,
Port=>’25’,
Timeout => 30,
Errmode => ‘return’,
);

if ($smtp) {
# $line = $smtp->getline;
$smtp->close();
return 1;
} else {
return 0;
}
}

[/perl]

check remote mailcheck remote mail server is up and onlinemail serverremote mail serverServer PortServer Port CheckTelnet
Get HTTP Code Response – Perl
Perl – Get the md5 hash for a file

Recent Posts

  • What is Software Piracy?
  • Microsoft and SITA Launch New Innovation Center in South Africa
  • Ericsson, Qualcomm and Thales to Launch 5G into Space
  • Schneider Electric Launches Free Data Center Professional Education Platform
  • UK and South Korea Reach Data Sharing Agreement

PodTech IO

The UK's #1 Software Development Company. PodTech IO builds custom software solutions for businesses. Call today for a free consultation

Company

  • About
  • Services
  • Contact
  • Blogs
  • Career

Terms

  • Terms & Conditions
  • Privacy Policy

Contact Us

  • ADDRESS

    Headquarter: Tabernacle Street London India: Vi john Tower, Gurgaon, Haryana
  • EMAIL

    info@podtech.com
  • CONTACT

    +44 (0) 20 8720 6583

Copyright ©2022 PodTech IO. All Rights Reserved

Logo