Start with these three; between them they explain most problems:
mailcoded health # store, secret backend, gates, per-account state
mailcoded account test # does the credential still work? IMAP and SMTP, separately
mailcoded stats # counters, the outbox, sends left this hour
In the TUI, S shows the same on one screen, including each account’s last error, and A runs the
connection test.
a wrong host or a firewall. An account with no credential is refused before this point, so a timeout means the settings are wrong rather than the credential
This account has no stored credential, so it cannot sync. ...
watching an account registered without a credential, or the local import account
mailcoded account reauth --account <id>, or leave it
auth (1000): No stored credential for <address>.
the same account, on an explicit sync, read or account test
as above. It is refused before the connection is attempted, so it fails at once rather than after a timeout
Live updates belong to another mailcoded window; press r to refresh here.
another daemon owns this store’s live connections
normal with two TUI windows; r refreshes (chapter 9)
Another live daemon (pid N) owns this store; watch connections stay closed here. (stderr)
the same, from the daemon’s side
any other red sync: ...
the server refused, or failed
A or account test for the detail; S for the last error
Still <something>. Press esc to give up on it.
a server operation is slow
wait, or esc to cancel it
The daemon is gone: ..., TUI exits 3
the daemon process died
the TUI prints the daemon’s recent stderr as it exits; run it again; mailcoded-tui --check
The daemon logs to stderr. When the TUI exits because the daemon died it prints what the daemon
said; to drive the daemon by hand, mailcoded-daemon --log-level debug.
mailcoded health --json and mailcoded stats --json are the complete pictures.
mailcoded-tui --check proves the wire without a screen.
A fresh sync from the server is always valid. mailcoded account forget --account <id> removes the
local copy — including your local Tags and drafts for that account — and mailcoded setup re-adds
it. If the store itself is damaged (exit 9), move the data directory aside and set up again; the
server still has your mail.