Docs / Obsidian Mail Server / Running the server
Troubleshooting
Start with the Setup guide: it checks the host name, DNS records and certificate, which cause most problems.
Mail from outside does not arrive
- Is the MX record right? The Domains page shows it. It must point to
mail.example.com(or to your filtering gateway, which must then deliver to this server). - Can the internet reach port 25? From a computer outside your network,
telnet mail.example.com 25should answer with220 mail.example.com. If not, check port forwarding and firewalls; many home internet lines block incoming port 25. - Did it arrive and go somewhere unexpected? Search for the sender in Track a message. Delivered means it is in the mailbox, perhaps moved by one of the person's rules or into Junk Email.
- Was it refused? The sender's error message says why.
550 5.1.1means the address does not exist here: check the spelling, and the person's addresses under Users & groups.
Mail to outside does not arrive
- Open Track a message and search for the recipient.
- Delayed: the Details column has the other server's answer; the server keeps trying for 2 days.
- Failed: the other server refused it; the sender received a notice with the reason.
- Connection timed out on every attempt usually means your provider blocks outgoing port 25: send through their relay instead (see Mail flow).
- Rejected as spam, or lands in the recipient's spam folder: check the SPF record (see DNS), the reverse DNS of your IP address, and whether your IP address is on a blocklist (MXToolbox has a blacklist check). A relay with a good reputation is the fastest fix.
Apps do not connect
- Password: can the person sign in to webmail at
https://mail.example.com/mail? If not, reset the password. - Too many attempts: after 10 wrong passwords within 15 minutes the account and the IP address are blocked for a while. A phone with an old password can cause this for everyone behind the same internet connection; fix the phone and wait 15 minutes.
- Certificate: a self-signed or expired certificate makes phones and Macs warn or fail. See Certificates.
- Automatic setup fails: the domain needs its
autodiscoverrecord, and the certificate must includeautodiscover.<domain>. Setting up manually with servermail.example.comworks around both. - Phone asks to accept security rules: that is the phone security policy; the person must accept it.
- Phone blocked: check Phones & tablets for a blocked or erase-pending device.
A service shows as down
The home page shows each service (mail transfer, IMAP, POP3, web) and whether its ports are listening. If one is down, look at the log:
sudo journalctl -u obsidian-mailserver -n 100
A common cause is another program using the same port after changes to the machine, or an error in a manual edit of the configuration file. The log names the problem.
The server does not start
sudo systemctl status obsidian-mailserver
sudo journalctl -u obsidian-mailserver-init -n 50
sudo journalctl -u obsidian-mailserver -n 100
- After editing the configuration file: it must stay valid JSON. Check it with
python3 -m json.tool /etc/obsidian-mailserver/appsettings.json; it prints the line of any error. - Database not reachable: check PostgreSQL with
sudo systemctl status postgresql. - Disk full:
df -h /var/lib. Mail stops being accepted when the disk is full.
Logs and useful commands
| To | Run |
|---|---|
| Follow the log live | sudo journalctl -u obsidian-mailserver -f |
| Restart the mail server | sudo systemctl restart obsidian-mailserver |
| See the queue | sudo oms queue |
| Track a message | sudo oms track --rcpt [email protected] |
| Check the server answers | curl -k https://localhost/healthz |
| Check which ports listen | sudo ss -tlnp |
Getting help
When asking for help, include the server version (0.9.0), what happened and when, and the relevant lines of the log. Never share passwords or the contents of /etc/obsidian-mailserver/db-password.