467,114 Members | 1,367 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,114 developers. It's quick & easy.

Net::SMTP Verify problem

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. }
  7.  
  8. Output:
  9. Net::SMTP=GLOB(0x8327468)>>> VRFY root
  10. Net::SMTP=GLOB(0x8327468)<<< 252 VRFY disabled
  11.  
VRFY ROOT: YES
Jul 7 '08 #1
  • viewed: 2392
Share:
1 Reply
numberwhun
Expert Mod 2GB
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 )
  2.  
  3.     Verify that ADDRESS is a legitimate mailing address.
  4.  
  5.     Most sites usually disable this feature in their SMTP service configuration. Use "Debug => 1" option under new() to see if disabled.
  6.  
Regards,

Jeff
Jul 7 '08 #2

Post your reply

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

Similar topics

2 posts views Thread by RandRace | last post: by
1 post views Thread by progTiger | last post: by
1 post views Thread by neog | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.