Net::SMTP Verify problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wootmaster
    New Member
    • Jul 2008
    • 1

    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:

    Code:
    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
    Last edited by numberwhun; Jul 7 '08, 11:56 AM. Reason: Please use code tags
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    I think that the following line of text from the Net::SMTP web page will help explain this:

    Code:
    verify ( ADDRESS )
    
        Verify that ADDRESS is a legitimate mailing address.
    
        Most sites usually disable this feature in their SMTP service configuration. Use "Debug => 1" option under new() to see if disabled.
    Regards,

    Jeff

    Comment

    Working...