Email Logs Overview
Email logs are stored persistently on the host system. Below are the locations and purposes of various log files, along with some troubleshooting tips.
Mailbox Data Location
- Path:
/var/local/enhance/email/mailboxes/{websiteId}/{emailAddress}
{websiteId}
: The ID of the website.{emailAddress}
: Full email address.
- Access Recommendation:
- Use
ssh
orsu
to the website user to avoid permission issues. - Modifying these files as root can disrupt user access or backups.
- Use
Postfix (MTA) Logs
- Path:
/var/log/postfix.log
- Purpose:
- Tracks incoming and outgoing messages.
- Useful for diagnosing delivery failures.
Troubleshooting Non-Delivery:
- Inbound Messages:
- Ensure external DNS points to the correct mail server.
- Check the "mail IP" on the website dashboard.
- Outbound Messages:
- Verify SPF/DKIM records.
- Confirm valid PTR records for the server’s IP addresses.
- Test port 25 connectivity using:
If a timeout occurs, the provider may be blocking port 25.telnet smtp.gmail.com 25
Mail Queue Management:
- View Queue:
mailq
- Clear Queue:
postsuper -d ALL
POP/IMAP (Dovecot) Logs
- View with:
journalctl -u dovecot
- Purpose:
- Logs POP/IMAP operations.
- Use when users cannot log in to their email.
Spam Filter (rspamd) Logs
- Config Path:
/etc/rspamd
- Configurations can be modified without affecting Enhance updates.
- Log Path:
/var/log/rspamd.log
Sender Rewriting Scheme (SRS)
- Function:
- Rewrites sender addresses for forwarded emails to pass SPF checks.
- Managed by
srs_milter
.