-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Multihomed MX records use only a single IP #28
Comments
Hi, Alexey! It make a sense, but what's wrong? In realization below we get array of mx records, and convert each mx record object to ip adress. def mx_records(domain)
Resolv::DNS.new.getresources(domain, Resolv::DNS::Resource::IN::MX).map do |mx_record|
Resolv.getaddress(mx_record.exchange.to_s)
end
end |
Each MX record contains a single hostname but this hostname can have multiple A records so it resolves into multiple IP addresses. When a single hostname resolves into multiple IPs it is called multihomed host. In my example above you can see only one MX record but it resolves into multiple address. With this example current implementation using |
Thanks for explanation, @AlexeyDemidov! I will fix it in next release 👍 |
Fixed! |
When we have multi-homed MX record(s) which resolves into multiple A records eg.
Only a single IP address will be checked as
Resolv.getaddress
is used for MX hosts name resolution instead ofResolv.getaddresses
.The text was updated successfully, but these errors were encountered: