Getting started
Quick start
From the demo mailbox to your own accounts in a few minutes.
1. Look around first
tern --demo
The demo has a mailbox, calendars and contacts that change only in memory. Try:
jkto move,⏎orlto read,spaceto page through a message.eto archive,dto trash,uto toggle unread,sto flag.Cfor the calendar,Pfor people,,for settings,?for every key.qto quit.
2. Write a config
tern --init
This writes an example to ~/.config/tern/config.toml. If a file is already there, it leaves it alone. Open it and fill in one account:
[[accounts]]
name = "Personal"
email = "you@example.com"
display_name = "Your Name"
[accounts.imap]
host = "imap.fastmail.com"
port = 993
tls = "implicit"
username = "you@example.com"
password_cmd = "pass show mail/personal"
[accounts.smtp]
host = "smtp.fastmail.com"
port = 465
tls = "implicit"
username = "you@example.com"
password_cmd = "pass show mail/personal"
password_cmd is any shell command that prints the password on its first line: pass, secret-tool lookup …, op read …. A literal password = "…" also works. tern doctor warns about it, because the password then sits in plain text.
The config needs at least one [[accounts]] entry. Once tern is running, you can add the rest from Settings → Accounts (, then 2). Pick Fastmail, Google, iCloud, Microsoft 365 or Other, and the form is prefilled with that provider’s mail, calendar and contacts servers. See Accounts.
Gmail and Microsoft accounts sign in with OAuth instead of a password. See OAuth.
3. Check it
tern doctor
tern doctor signs in to every IMAP and SMTP server without sending anything. It also runs your password commands, checks OAuth tokens, finds your calendars and address books, and looks over your local setup. Each problem comes with what to do about it. See tern doctor.
4. Run it
tern
You land in the first account’s inbox. A few things to know on day one:
- A message counts as read only after it’s been open for 800 ms (
mark_read_ms), so skimming past withjdoesn’t mark everything read. - Archive, trash and move update the list at once. The server catches up in the background.
- New mail is pushed to the folder you’re in.
$checks now. - Sending goes through an outbox with a 10-second undo window (
^z). See Sending.
5. Add calendars and contacts
If you added the account from Settings with a preset, its calendar and contacts servers are already set up. Otherwise add a [[dav]] block:
[[dav]]
name = "Fastmail"
url = "https://caldav.fastmail.com/dav/"
username = "you@example.com"
account = "Personal" # reuse that account's password or OAuth sign-in
Then press C for the calendar and P for people. See Calendar and People.