I'm writing a script that will run a few tests on a given mail server, it's meant to test to see if VRFY and EXPN is enabled or not. However, when I use "verify" to test to see if VRFY is enabled on the given host, if VRFY is disabled on the server the "verify" function will still return true/1.
I used the Debug function to check, and it shows that VRFY is disabled on the mail server.
Is there a reason or a way around this?
snippet of code concerned:
-
my $verify = $smtp->verify('root');
-
if ($verify == 1){
-
print "\nVRFY ROOT: YES\n";
-
} else {
-
print "\nVRFY ROOT: NO\n";
-
}
-
-
Output:
-
Net::SMTP=GLOB(0x8327468)>>> VRFY root
-
Net::SMTP=GLOB(0x8327468)<<< 252 VRFY disabled
-
VRFY ROOT: YES