If emails are not being received or sent from the server: check MX records, SPF/DKIM/DMARC, mail server logs, and the message queue.
Applies to:
✔ VPS
✔ Dedicated servers
✔ Postfix, Exim
dig example.com MX +short
dig example.com TXT +short | grep spf
v=spf1 ip4:SERVER_IP mx -all
dig selector._domainkey.example.com TXT +short
dig _dmarc.example.com TXT +short
systemctl status postfix
systemctl status exim4
Postfix:
tail -100 /var/log/mail.log
Exim:
tail -100 /var/log/exim4/mainlog
grep "recipient@example.com" /var/log/mail.log | tail -20
postqueue -p
postqueue -f
telnet gmail-smtp-in.l.google.com 25
If the connection fails, port 25 may be blocked. Contact support to unblock it.
echo "Test" | mail -s "Test mail" test@example.com
tail -5 /var/log/mail.log
Status "sent" means successful delivery.
If emails are sent but not delivered, the issue may be IP blocking, missing PTR record, or spam list inclusion. Open a support ticket for IP reputation check.