Check If Your Server Can Send Mail
# Test with sendmail
echo "Test" | sendmail -v user@gmail.com
# Check mail queue
postqueue -p
# Check mail log
tail -f /var/log/mail.logCommon Delivery Problems
1. Email Goes to Spam
# Check your authentication records
dig example.com TXT +short | grep spf
dig mail._domainkey.example.com TXT +short
dig _dmarc.example.com TXT +shortAll three (SPF, DKIM, DMARC) should be properly configured.
2. IP Is Blacklisted
# Check Spamhaus
dig +short YOUR_IP_REVERSED.zen.spamhaus.org
# Empty = not listed, 127.0.0.x = listed
# Check multiple blacklists at once
# Use MXToolbox.com blacklist check3. Port 25 Is Blocked
# Test outbound port 25
telnet gmail-smtp-in.l.google.com 25
# If it times out, your provider blocks port 25Solution: Use a relay service (SendGrid, Mailgun, Amazon SES) on port 587.
4. Missing PTR Record
dig -x YOUR_IP +short
# Should return your mail hostname5. TLS Issues
# Test TLS
openssl s_client -starttls smtp -connect mail.example.com:587Email Testing Tools
- mail-tester.com — send a test email, get a spam score
- MXToolbox — check DNS records, blacklists, and connectivity
- Gmail headers — check Received-SPF, DKIM, and DMARC results
Reading Email Headers
In Gmail, click the three dots on any email → "Show original". Look for:
Received-SPF: pass
DKIM-Signature: ... (verify with dkim=pass)
Authentication-Results: dmarc=pass