Outbound emails stuck in MTA queue on Email security device with error "DNS query failed".
Question:
How to fix the issue with outbound emails stuck in MTA queue on Email security device with error "DNS query failed".
Answer:
Email security server does not have any DNS servers so they use the DNS servers mentioned on the host configuration page:
To find out which DNS server used by ES follow the steps mentioned below:
1. Go to Manage | System Setup | Server | Host configuration | Network Settings
2. Scroll towards the bottom of the page and look for Network setting
3. Check the Primary and Secondary DNS servers.
4. These DNS servers are used by ES device to query and send emails out.
1. Go to Investigate |Tools | Diagnostics
2. Select the "Query DNS for MX Record of the specified Domain" from drop down menu
3. Put the domain name in question in the box next to it
4. Click on go
5. This will display the query result
6. This query shows 0 results which means this domain either does not have valid MX record or the DNS server is unable to pull the correct information.
Screen shot of Query result for a valid domain:
A Valid domain will return return the mx query and the " Answer " will return any number other than 0 depending on the number of mx records a domain has.

NOTE: If the navigation or the screenshot looks different from the one mentioned above , you may be in an older firmware version and would require a firmware upgrade. Please refer the link below to upgrade the firmware to latest version.
https://www.sonicwall.com/en-us/support/knowledge-base/170504270079039