Nicolas:

It is good to hear that you are working to measure EAI support among real-world email servers. You ask a good question. It is totally on-topic for the ua-eai list. Unfortunately, I don't have any expert answers.

I can, however, suggest that when you have a different question to ask a mailing list, that you send a new message with a newly-written Subject: line that describes your intent. Your message instead replied to an existing message and had a Subject: line that did not describe your intent.  That makes it more likely to get lost, and incidentally makes it harder to find in email list archives.

Best regards,
     —Jim DeLaHunt

On 2025-02-12 10:10, Nicolas Fiumarelli via UA-EAI wrote:
Dear all,  Dear Seda,  

Apologies for the off-topic message, but I would appreciate your guidance on finding available UA-related code (preferably in Python) for checking IDNs and EAI.  

We are organizing UA Day in Montevideo, Uruguay again this year, and I want to enhance our measurement approach. 
Last year, I used a script to check email addresses by retrieving MX records, performing a telnet connection, and verifying compliance—this served as one measurement test for the participants and other entities in the country.
e-mail addresses to check their servers.  
I think we can compare results year-over-year to track progress in EAI adoption.  
I’d love your insights on:  
1. Additional probes we could use to assess participants' UA readiness.  
2. Your thoughts on last year’s code—are there more UA or advanced resources available for measurement?  

Here is the script we used for measurement:

#!/bin/bash

# UA Measurement Script by Nicolas

total_mx_count=0
total_mx_support=0

check_esmtputf8() {
  local domain=$1
  mx_records=$(dig +short MX "$domain" | awk '{print $2}')

  for mx in $mx_records; do
    ((total_mx_count++))
    response=$( (sleep 2; echo "EHLO test"; sleep 2; echo "QUIT") | telnet "$mx" 25 2>/dev/null)
    if echo "$response" | grep -qE "250[ -]SMTPUTF8"; then
      ((total_mx_support++))
    fi
  done
}

email_list="nico@bbva.com.uy,nico@fing.edu.uy" # List of e-mail addresses to check"
IFS=',' read -r -a emails <<< "$email_list"

for email in "${emails[@]}"; do
  domain=$(echo "$email" | awk -F '@' '{print $2}')
  check_esmtputf8 "$domain"
 
done

if [ $total_mx_count -gt 0 ]; then
  percentage=$(echo "scale=2; ($total_mx_support / $total_mx_count) * 100" | bc)
  echo "Percentage of MX servers supporting SMTPUTF8: $percentage%"
else
  echo "No MX servers found."
fi
```

Looking forward to your input!  

Best regards,  
Nicolás

_______________________________________________
UA-EAI mailing list -- ua-eai@icann.org
To unsubscribe send an email to ua-eai-leave@icann.org
_______________________________________________
By submitting your personal data, you consent to the processing of your personal data for purposes of subscribing to this mailing list accordance with the ICANN Privacy Policy (https://www.icann.org/privacy/policy) and the website Terms of Service (https://www.icann.org/privacy/tos). You can visit the Mailman link above to change your membership status or configuration, including unsubscribing, setting digest-style delivery or disabling delivery altogether (e.g., for a vacation), and so on.
-- 
    --Jim DeLaHunt, jdlh@jdlh.com     http://blog.jdlh.com/ (http://jdlh.com/)
      multilingual websites consultant, Vancouver, Canada