Prompt
How do I get logs for failed email deliveries?
Latest observation
Nov 8, 2026
OpenAI APIWeb search: off
To get logs for failed email deliveries, it depends on what system is sending the email. Here are the most common places to check:
If you use a mail server / SMTP relay
- Check the mail server logs:
- Postfix:
/var/log/maillogor/var/log/mail.log - Exim:
/var/log/exim/mainlog - Sendmail:
/var/log/maillog - Microsoft Exchange: Message Tracking Logs
- Postfix:
- Search for:
- recipient address
- message ID / queue ID
- SMTP error codes like
550,554,421,451
If you use a cloud email service
- Amazon SES: enable delivery, bounce, complaint, and reject notifications via SNS/EventBridge
- SendGrid: check Email Activity and event webhooks
- Mailgun: use Logs and Webhook events
- Postmark: use Activity and webhooks
- Microsoft 365 / Exchange Online: use Message trace
- Google Workspace: use Email Log Search
If emails are sent by your application
- Check your app’s logs for:
- SMTP connection errors
- auth failures
- timeouts
- invalid recipient addresses
- provider responses
- Make sure logging includes:
- timestamp
- sender/recipient
- subject or message ID
- SMTP response code and message
If you want to capture failures proactively
- Enable bounce processing or delivery notifications
- Configure webhooks from your email provider
- Store a message ID for every outgoing email so you can correlate events
Quick troubleshooting tips
- Look for common SMTP failure codes:
550= mailbox/user not found or rejected552= mailbox full or message too large554= rejected by policy/spam filter421/451= temporary failure
If you tell me which email system/provider you’re using, I can give you the exact place to check and how to query the logs.