Updated the script to use the newer, optimized SQL query for gathering information related to "relay hosts".