By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,542 Members | 1,434 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,542 IT Pros & Developers. It's quick & easy.

Net::SMTP Verify problem

P: 1
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:

Expand|Select|Wrap|Line Numbers
  1. my $verify = $smtp->verify('root');
  2. if ($verify == 1){
  3.     print "\nVRFY ROOT: YES\n";
  4. } else {
  5.     print "\nVRFY ROOT: NO\n";
  6. }
  8. Output:
  9. Net::SMTP=GLOB(0x8327468)>>> VRFY root
  10. Net::SMTP=GLOB(0x8327468)<<< 252 VRFY disabled
Jul 7 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 2.5K+
P: 3,503
I think that the following line of text from the Net::SMTP web page will help explain this:

Expand|Select|Wrap|Line Numbers
  1. verify ( ADDRESS )
  3.     Verify that ADDRESS is a legitimate mailing address.
  5.     Most sites usually disable this feature in their SMTP service configuration. Use "Debug => 1" option under new() to see if disabled.

Jul 7 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.