Skip to content

Self-hosting a relay

An independent relay needs a mail operator to manage DNS, delivery queues, backups, abuse reports and sending reputation.

The private comail-relay repository contains the AGPL-3.0 source for the relay, web sidecar, labeler and label API, webhook bridge, and EU warmer. Contact the operator about source access before planning a deployment.

After you get access, follow the repository’s README and contribution guide for build requirements and licensing. comail-web owns the public site and docs, and Inbox and Builders each have their own repository. The older atmosphere-mail checkout, its root Dockerfile, and its combined infra/ build reflect the previous layout.

Comail keeps the hosted NixOS configuration, deploy workflows and credentials in a private infrastructure repository. Plan configuration and credentials for the service you intend to run.

  • Get a stable public sending IP and configure forward and reverse DNS. Check whether your provider allows outbound SMTP on port 25.
  • Control the operator signing domain and its DNS records.
  • Store API keys and signing keys securely. Test backup and recovery.
  • Keep relay state across restarts and check that you can roll back a deploy while preserving that state.
  • Monitor an abuse address and register with the feedback programs you intend to use.

DKIM rotation explains how the operator and member signing keys differ.

Build the service from its owning repository and run its tests. On your deployment, test authentication, domain verification, TLS, queue recovery, rate limits, and abuse handling. Send test mail to mailboxes you control, check the authentication headers, and keep admin interfaces private. Review and adapt any hosted CI commands before running them against your service.

The relay can generate operator DKIM keys if the configured key file is missing. Publish the public keys in DNS before relying on those signatures. DKIM rotation describes selectors, storage and rotation limits.

An independent relay needs its own domain verification and labeler, or a supported agreement with another operator. Clients need to know which labeler to trust.

Each operator controls routing, complaints and suppression for its own relay. When a member changes operators, the new operator needs to verify domain ownership and decide whether to accept the member. The old relay keeps its IP history, operator signatures, feedback registrations and local queues. See federation and reputation portability.

Watch delivery responses, queue depth, authentication failures, bounces and complaints. Check that each provider has enrolled your relay in its feedback program and that reports reach the expected destination.

Report issues in the owning repository. Include the release revision and a redacted error. Leave out credentials, message text and member data.

Back to docs