Skip to content

Since 1.197, with Net::DNS installed, mx no longer passes A records #30

@dracos

Description

@dracos

With Email::Valid 1.196 and Net::DNS:

$ perl -e'use Email::Valid; $em = Email::Valid->new(-mxcheck => 1); my $f = $em->address("test\@newswww.bbc.net.uk"); print "$f\n"'
test@newswww.bbc.net.uk

With Email::Valid 1.198 and Net::DNS:

$ perl -e'use Email::Valid; $em = Email::Valid->new(-mxcheck => 1); my $f = $em->address("test\@newswww.bbc.net.uk"); print "$f\n"'

The issue is caused by the change to using Net::DNS::mx in 1.197 #18, which only searches MXs. If Email::Valid is no longer going to allow As without MXs, then the documentation of mx() needs to be fixed, as the code comment still says "# Purpose: Check whether a DNS record (A or MX) exists for a domain." and the pod says "This method accepts an email address or domain name and determines whether a DNS record (A or MX) exists for it."

If Net::DNS is not installed, then As are passed as valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions