Adalennis opened a new issue, #9196: URL: https://github.com/apache/hop/issues/9196
### Apache Hop version? SNAPSHOT-20261021 ### Java version? Java 21 ### Operating system macOS ### What happened? Found while documenting the result of the Mail validator action (#8970, PR #9195). With *SMTP check* selected and *Default SMTP server* empty, an address of a domain that has an A record but no MX record is always reported as not valid, without any SMTP connection. For example `[email protected]` (no MX, A 34.223.124.45), run with hop-run at Detailed level: Checking email address [[email protected]] ... Address email [[email protected]] is not valid. Error getting machines : Index 1 out of bounds for length 1 The action is false with 1 error. When the domain has no MX record, MailValidation.getMX() falls back to the A record ("try the machine itself"), but it then parses every value as an MX value, `preference host.`: String[] f = x.split(" "); if (f[1].endsWith(".")) { // MailValidation.java line 120 An A value is only the IP address (`34.223.124.45`), so `f[1]` throws ArrayIndexOutOfBoundsException. isAddressValid() catches it (line 182) and the address is reported as not valid. A plain Java lookup with the same JNDI DNS context shows the two formats: gmail.com MX -> "40 alt4.gmail-smtp-in.l.google.com." (2 parts) neverssl.com A -> "34.223.124.45" (1 part) So the A record fallback never works: the domain itself is never tried on port 25. Expected: for an A record, use the value as it is (the address of the host) and try it on port 25, as the comment in getMX() says. Domains without any MX or A record should keep failing. Workaround: set *Default SMTP server*, then getMX() is not called. The current behaviour is documented in a NOTE on the Mail validator page (PR #9195), so the docs need an update when this is fixed. ### Issue Priority Priority: 3 ### Issue Component Component: Hop Gui -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
