Q1. Do you get similar results?

Kinda sorta , see below

Q2. Why am I getting inconsistent results?

Networks are networks, they're inconsistent by nature

Or maybe old module needs TLC? Bug #106606 for Mail-CheckUser: Missing code checks in check_user_on_host

I'm guessing probably a timeout occurs or the domain check is skipped the times you get validation

Q3. Can you suggest a better way of doing this check? (Basically I want to at least check the syntax of the address and that the domain exists, and I want a result within a second.)

I might give Email::Valid a try

#!/usr/bin/perl -- BEGIN{$Mail::CheckUser::Skip_SMTP_Checks = 1}; use strict; use warnings; use Mail::CheckUser qw/ check_email last_check /; use Email::Valid; for (qw/ a@b.com a@abczz123ffz.com /){ for my $i (0..9){ print "$_ -> "; my $tt = time; #~ Alpha($_); Omega($_); print " ", time-$tt, "\n"; } } sub Omega { my $ev = Email::Valid->new( -mxcheck => 1, ); if ( $ev->address( "$_" ) ){ print "OK"; }else{ print "NOT OK ", $ev->details ; } } sub Alpha { if ( check_email($_)){ print "OK" }else{ print last_check()->{reason}; } } __END__ a@b.com -> DNS failure: NXDOMAIN 0.293894052505493 a@b.com -> DNS failure: NXDOMAIN 0.206084966659546 a@b.com -> DNS failure: NXDOMAIN 0.219376087188721 a@b.com -> DNS failure: NXDOMAIN 0.218585014343262 a@b.com -> DNS failure: NXDOMAIN 0.249444961547852 a@b.com -> DNS failure: NXDOMAIN 0.250465869903564 a@b.com -> DNS failure: NXDOMAIN 0.249492883682251 a@b.com -> DNS failure: NXDOMAIN 0.249480009078979 a@b.com -> DNS failure: NXDOMAIN 0.249181985855103 a@b.com -> DNS failure: NXDOMAIN 0.251276016235352 a@abczz123ffz.com -> DNS failure: NXDOMAIN 0.251024007797241 a@abczz123ffz.com -> DNS failure: NXDOMAIN 0.248931884765625 a@abczz123ffz.com -> DNS failure: NXDOMAIN 0.250422954559326 a@abczz123ffz.com -> DNS failure: NXDOMAIN 0.249350070953369 a@abczz123ffz.com -> DNS failure: NXDOMAIN 0.250164985656738 a@abczz123ffz.com -> DNS failure: NXDOMAIN 0.251390933990479 a@abczz123ffz.com -> DNS failure: NXDOMAIN 0.248254060745239 a@abczz123ffz.com -> DNS failure: NXDOMAIN 0.281542062759399 a@abczz123ffz.com -> DNS failure: NXDOMAIN 0.240454912185669 a@abczz123ffz.com -> DNS failure: NXDOMAIN 0.254595994949341 a@b.com -> NOT OK mxcheck 0.291569948196411 a@b.com -> NOT OK mxcheck 0.208410024642944 a@b.com -> NOT OK mxcheck 0.219083070755005 a@b.com -> NOT OK mxcheck 0.218981981277466 a@b.com -> NOT OK mxcheck 0.24937891960144 a@b.com -> NOT OK mxcheck 0.249850988388062 a@b.com -> NOT OK mxcheck 0.328232049942017 a@b.com -> NOT OK mxcheck 0.250256061553955 a@b.com -> NOT OK mxcheck 0.265328884124756 a@b.com -> NOT OK mxcheck 0.247688055038452 a@abczz123ffz.com -> NOT OK mxcheck 0.392891883850098 a@abczz123ffz.com -> NOT OK mxcheck 0.250204086303711 a@abczz123ffz.com -> NOT OK mxcheck 0.249541044235229 a@abczz123ffz.com -> NOT OK mxcheck 0.453320026397705 a@abczz123ffz.com -> NOT OK mxcheck 0.218268156051636 a@abczz123ffz.com -> NOT OK mxcheck 0.218549966812134 a@abczz123ffz.com -> NOT OK mxcheck 0.250627994537354 a@abczz123ffz.com -> NOT OK mxcheck 0.312192916870117 a@abczz123ffz.com -> NOT OK mxcheck 0.234641075134277 a@abczz123ffz.com -> NOT OK mxcheck 0.250532865524292

In reply to Re: Mail::CheckUser inconsistent results by Anonymous Monk
in thread Mail::CheckUser inconsistent results by tel2

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.