Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Email::Valid rejecting emails @example.com today

by Anonymous Monk
on Sep 06, 2019 at 23:55 UTC ( [id://11105764]=note: print w/replies, xml ) Need Help??


in reply to Re: Email::Valid rejecting emails @example.com today
in thread Email::Valid rejecting emails @example.com today

I personally wrote the patch that caused example.com to be invalid in accordance with the RFCs

Hi,

Hmm, which rfc are you reading? I see what you did, it goeas against rfc6761.

- treat restricted/reserved TLDs (invalid, test, example, loca +lhost) as invalid (thanks, Steve Bertrand!) # Purpose: Check whether a top level domain is valid for a domain. sub tld { my $self = shift; my %args = $self->_rearrange([qw( address )], \@_); unless (eval {require Net::Domain::TLD; Net::Domain::TLD->VERSION(1. +65); 1}) { die "Net::Domain::TLD not available"; } my $host = $self->_host( $args{address} or return $self->details('tl +d') ); my ($tld) = $host =~ m#\.(\w+)$#; my %invalid_tlds = map { $_ => 1 } qw(invalid test example localhost +); return defined $invalid_tlds{$tld} ? 0 : Net::Domain::TLD::tld_exist +s($tld); }

Did you goof? https://tools.ietf.org/html/rfc6761 says

2. Application software SHOULD NOT recognize example names as special and SHOULD use example names as they would other domain names.

Replies are listed 'Best First'.
Re^3: Email::Valid rejecting emails @example.com today
by soonix (Canon) on Sep 07, 2019 at 10:15 UTC
    example.com is a second level domain, not a top level domain.
    The function you quoted deals with TLD, as in not.existing.example

    example.com seems to be treated as any other domain, which is by looking it up in DNS - which fails if there's no corresponding record

Re^3: Email::Valid rejecting emails @example.com today
by stevieb (Canon) on Sep 07, 2019 at 00:24 UTC

    :)

    I must have misunderstood.

      Maybe so , happens to everybody .... but does that help users of Email::Valid or not ?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11105764]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-19 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found