#!/usr/bin/perl
#
# apt-get install libmail-verify-perl
# /usr/share/perl5/Mail/Verify.pm
# valores de retorno
# 0 The email address appears to be valid.
# 1 No email address was supplied.
# 2 There is a syntaxical error in the email address.
# 3 There are no DNS entries for the host in question (no MX records or A records).
# 4 There are no live SMTP servers accepting connections for this email address.
use Mail::Verify;
$file = «emails.lst»;
open (F, «$file») or die $!;
while ( $email =
chomp($email);
print «checkeando… $email\n»;
my $email_ck = Mail::Verify::CheckAddress( $email );
if( $email_ck > 0) {
# malo
print «–[$email_ck] $email\n»;
}
else{
#bueno
print «++[$email_ck] $email\n»;
}
}
close F;
Deja una respuesta