Skip to content

Email

The mail the server sends, the SMTP URL it needs, and how to test it.

View Markdown
Use with AI

Take the context you need.

Browse the llms.txt indexView all docs as MarkdownChoose a bundle or get started

The server sends mail for five things: to confirm an email address, to reset a password, to change the address, to delete the account, and to sign a PLC operation. Each mail carries a token, and the flow waits for it.

Without SMTP the server sends nothing. A server of one can go without; before you invite other people, set it up, or nobody can reset a forgotten password.

Add these settings to your runtime environment file:

PDS_EMAIL_SMTP_URL=smtps://user:password@smtp.example.com/
PDS_EMAIL_FROM_ADDRESS=pds@example.com

The URL names the scheme, the credentials and the host. smtps:// is TLS on port 465; smtp:// on port 587 upgrades to TLS. Add a port after the host when the provider uses another one.

A sender address at the server’s own domain, or at a domain whose SPF and DKIM records name the provider, keeps the mail out of spam folders.

Restart after the change. For NixOS or the native systemd example:

Terminal window
sudo systemctl restart linkjar-pds

For Compose:

Terminal window
docker compose up -d

Ask for a password reset for an account whose address you can read:

Terminal window
curl -s -H 'content-type: application/json' -d '{"email":"alice@example.com"}' https://pds.example.com/xrpc/com.atproto.server.requestPasswordReset

The answer is empty with status 200, and the mail arrives within a minute. A mail that gates a flow is sent before the request is answered, so an SMTP failure fails the request, with the reason in the logs:

For a native service, use sudo journalctl -u linkjar-pds. For Compose, use docker compose logs pds. See monitoring.

A moderation service can send mail to an account through the admin API. It goes out with PDS_MODERATION_EMAIL_SMTP_URL and PDS_MODERATION_EMAIL_ADDRESS when they are set, and with the server’s own sender otherwise.