π ~1 min read
Table of contents
Symptom & Impact
Outbound email delays increase and queue files accumulate until storage or SLA limits are hit.
Environment & Reproduction
Appears when resolver path changes or upstream DNS latency spikes.
mailq | head -n 40
service sendmail status
cat /etc/resolv.conf
Root Cause Analysis
sendmail cannot resolve MX/A records in time, deferring deliveries repeatedly.
Quick Triage
Verify resolver health and outbound SMTP reachability.
drill gmail.com mx
fetch -o /dev/null https://1.1.1.1 || true
nc -vz smtp.gmail.com 25 || true
Step-by-Step Diagnosis
Inspect queue diagnostics and resolver timeout behavior.
grep -i 'deferred|host name lookup failure' /var/log/maillog | tail -n 80
truss -p $(pgrep sendmail | head -n1) 2>/dev/null | head -n 40

Solution – Primary Fix
Correct resolver configuration, restart MTA, then force queue run.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
vi /etc/resolv.conf
service sendmail restart
/usr/sbin/sendmail -q -v

Solution – Alternative Approaches
Use local unbound for resilient caching and reduced external DNS dependency.
pkg install -y unbound
service local_unbound enable
service local_unbound start
Verification & Acceptance Criteria
Queue drains steadily and new messages deliver within expected interval.
mailq | head -n 20
grep -i 'stat=Sent' /var/log/maillog | tail -n 20
Rollback Plan
Restore prior resolver config and disable local cache if it introduces failures.
cp /root/backup/resolv.conf /etc/resolv.conf
service local_unbound stop || true
Prevention & Hardening
Monitor queue depth and DNS latency as first-class mail health indicators.
mailq | wc -l
drill . ns
Related Errors & Cross-Refs
May overlap with outbound firewall filters on port 53 or 25.
Related tutorial: View the step-by-step tutorial for freebsd-15.
View all freebsd-15 tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
sendmail operation guide and FreeBSD resolver subsystem documentation.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.