registry
registry copied to clipboard
updated errors message if hostname response to A/AAAA records
What's the issue?
- The problem is an error message appearing during email validation, even though the validation result is positive. In other words, the email passes the validation and has an attribute
success = true, but still, in the errors field, contains error information such astarget host(s) not found.
Why does this error occur?
- The hostname of the email box is checked by the Truemail gem, and indeed, MX record-based email validation may yield an error. However, this does not mean the email is invalid. The email can also resolve to A/AAAA records, which allows the use of this mailbox. The problem is that Truemail logs error information, while additional validation based on A/AAAA records returns a positive result.
How did you solve it?
- If the A/AAAA validation result turned out to be positive, then I update the error information to the following text:
target host(s) not found, but was able to find A/AAAA records for domain.
How to test?
- Appropriate emails must be available that do not pass MX validation but have A/AAAA records at the same time. Run the rake task
bundle exec rake verify_email:check_all -- --check_level=mx --spam_protect=true, and make sure that the ValidationEvent entries associated with the contact have asuccess==trueresult, as well as the error recordtarget host(s) not found, but was able to find A/AAAA records for domain
