Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Email

The server sends two kinds of email, and only if you give it an SMTP server:

EmailSent whenWithout SMTP
“Your Drusite sign-in link”Someone asks for a magic linkMagic links can’t be turned on
“Sam invited you to Work”Someone invites an email to a workspace or a pageThe app shows the invitation link to copy and send yourself

There’s no other mail: no newsletters, no notifications, no tracking.

Configure it

[smtp]
host = "smtp.example.com"
port = 587                  # unset: 465 for tls, 587 for starttls, 25 for none
tls = "starttls"            # or "tls" (TLS from the first byte), or "none"
username = "notes@example.com"
password_file = "/run/secrets/smtp-password"
from = "Drusite <notes@example.com>"
  • tls = "starttls" (the default) upgrades the connection and fails if the server can’t, so a password is never sent in the clear. Use "none" only for a relay on the same host or network.
  • Set username and password together, or neither (a relay that trusts your network).
  • from must be an address your provider lets you send from. Set up SPF and DKIM for its domain, or invitations will land in spam.

Every key can come from the environment: DRUSITE__SMTP__HOST, DRUSITE__SMTP__PASSWORD_FILE and so on.

Checking it

With magic links on, the server connects to the SMTP server when it starts and stops if it can’t, so a wrong password shows at once rather than when someone tries to sign in. To test sending, invite yourself to a workspace from the app, or ask for a magic link.

Providers that work: any SMTP service (Amazon SES, Postmark, Mailgun, SendGrid, Fastmail, Google Workspace with an app password), or your own Postfix. For trying things out, Mailpit catches everything locally:

docker run -d --name mailpit -p 8025:8025 -p 1025:1025 axllent/mailpit
[smtp]
host = "localhost"
port = 1025
tls = "none"
from = "Drusite <notes@example.test>"

Then open http://localhost:8025 to read what was sent.