leehaut opened a new pull request, #9261: URL: https://github.com/apache/hop/pull/9261
Fix https://github.com/apache/hop/issues/9196 ## Summary - Fix Mail validator SMTP check for domains that have an A record but no MX record. - `getMX()` already fell back to the A record ("try the machine itself"), but then always parsed the value as MX `preference host`, so a bare A address like `34.223.124.45` threw `ArrayIndexOutOfBoundsException` and the address was reported invalid without any SMTP attempt. - Introduce `extractMailHost()` to handle both MX (`40 host.example.com.`) and A (`34.223.124.45`) DNS attribute values, and add unit tests for those cases. ## Test plan - [x] Reproduce with SMTP check enabled, Default SMTP empty, address `[email protected]` (no MX, A `34.223.124.45`) - [x] Before fix: fails immediately with `Error getting machines : Index 1 out of bounds for length 1` - [x] After fix: no index error; attempts SMTP to the A address and fails with a connection timeout (`Connection timed out: connect`) — expected for neverssl.com - [x] Run `MailValidationTest` -- 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]
