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 Guides

How email works today, what it takes to get your mail delivered, and which setup fits your goals — from a hosted mailbox on your own domain to running your own mail server on StartOS.

Why This Guide Exists

Email is the one protocol almost everyone still uses that no single company owns. Anyone can, in principle, run a mail server and exchange mail with the rest of the world. In practice, a handful of providers now decide whose mail reaches an inbox, and the rules they apply are invisible from the outside. People who set out to “own their email” often discover this the hard way: their server works, their records check out, and their messages still land in spam or bounce.

This guide explains why, and lays out the realistic options. Most people’s goals — an address they control, privacy from advertisers and data brokers, independence from any one company — can be met without running a mail server at all. For those who do want their mail on their own hardware, StartOS makes it practical, provided outgoing mail is sent the right way.

Quick Answer

Your goalStart here
An address you own, mail that arrives, minimal upkeepHosted Email on Your Domain
Your mailbox stored on your own serverSelf-Hosting with Stalwart
Mail that can’t easily be tied to your identityEmail and Privacy
Services on StartOS (Nextcloud, Vaultwarden, …) that send mailSMTP Credentials
Help decidingEmail Setups Compared, then Recommendations

What’s in This Guide

Understanding Email

  • How Email Works — The pieces every message passes through, and the short history of how an open protocol came to be run by a few large providers.

  • Deliverability — Why correct records are not enough, how receiving servers judge reputation, why mail sent directly from a home or VPS address struggles, and how to read a bounce.

  • Email and Privacy — Who can read your mail in each setup, what metadata reveals, what end-to-end encryption does and doesn’t cover, and what anonymity takes.

Choosing a Setup

  • Your Own Domain — Why an address at your own domain is what actually makes you independent, and what owning one involves.

  • Email Setups Compared — Every common setup side by side: who holds your mail, whether it arrives, what it costs and how much work it is.

  • Recommendations — What we suggest for individuals, families, small businesses, people who need anonymity, and people who want to run it all themselves.

Setting Up

  • Hosted Email on Your Domain — Your domain on a privacy-focused provider, read and sent from Thunderbird on your computer and phone.

  • Self-Hosting with Stalwart — How a mail server on StartOS fits together: receiving through StartTunnel, sending through a relay, and what you take on.

  • SMTP Credentials — Getting sending credentials from Forward Email, Amazon SES, Gmail, Mailgun, Proton Mail or SendGrid, for StartOS, a Stalwart relay or any app.

  • Moving Your Mail — Bringing your old mail along, and running your old and new addresses side by side while you switch.

Learn More

How Email Works

The handful of pieces every message passes through, and how an open protocol that anyone could run came to be governed by a few large providers.

The Pieces

Email splits into two jobs that are easy to confuse: delivering mail between servers, and reading it from your devices.

  • Your domain is the part after the @. Its DNS records tell the world which server accepts mail for it and which servers are allowed to send on its behalf.
  • A mail server does the delivering. It accepts mail addressed to your domain, stores it in your mailbox, and hands your outgoing mail to the recipient’s server.
  • A mail app (Thunderbird, Apple Mail, a webmail page) does the reading. It connects to your mail server, shows you your mailbox, and passes the messages you write to the server for delivery. The app never talks to the recipient directly.

Between servers, mail travels over SMTP (Simple Mail Transfer Protocol). Your app sends your outgoing mail to your own server over SMTP too, after signing in. To read, your app uses IMAP, which keeps the mailbox on the server and syncs every device to it, or the newer JMAP, which does the same job more efficiently.

What Happens When You Send

  1. You write a message in your app and press Send. The app signs in to your mail server and hands it over.
  2. Your server looks up the recipient’s domain in DNS. Its MX record names the server that accepts mail for that domain.
  3. Your server connects to that server on port 25 and offers the message.
  4. The receiving server checks who is sending: the connecting IP address, its reverse DNS name, the domain’s published sending rules, and a cryptographic signature on the message. It then decides whether to accept the message and, if so, whether it belongs in the inbox or the spam folder.
  5. The recipient’s app picks the message up over IMAP or JMAP.

If step 3 or 4 fails temporarily — the receiving server is down, or it asks your server to try later — your server keeps the message in a queue and tries again, typically for several days. That is why email survives outages that would break most other services: a server that is offline for an hour misses nothing, it just receives the backlog late.

A Short History

An open network

Email predates the web by two decades. By the early 1980s, mail moved between the networked computers of universities, labs and companies under a simple rule: any server would accept a message from any other and, if needed, pass it along toward its destination. SMTP was written for that world. It had no way to check who a sender really was, because everyone on the network knew each other.

The design was a success. The protocol that carries mail today is still recognizably the one from 1982, and it still works between any two servers that agree to talk.

Spam, and the first walls

When the internet opened to the public in the 1990s, that trust became a liability. Advertisers discovered that sending a million messages cost almost nothing, and servers that relayed mail for anyone carried their spam for free.

Administrators responded by building walls, one at a time:

  • Servers stopped relaying mail for strangers.
  • Shared blocklists appeared: lists of IP addresses known to send spam, which any mail server could consult before accepting a message.
  • Internet providers began blocking outgoing connections on port 25 from home connections, after spammers learned to send through millions of infected home computers. Blocklists began listing whole ranges of home addresses as places mail servers shouldn’t run.

Proving who you are

In the 2000s, the industry added ways for a domain to vouch for its own mail:

  • SPF lets a domain publish which servers may send its mail.
  • DKIM lets a sending server sign each message, so the receiver can verify it came from the domain it claims and wasn’t altered.
  • DMARC ties the two to the address the reader sees, and tells receivers what to do with mail that fails.

These made forging a domain’s mail much harder. They did not stop spam: a spammer can set up SPF and DKIM on a fresh domain as easily as anyone. Proving who you are says nothing about whether you are worth hearing from.

Reputation decides

So receivers turned to reputation: a running score for every sending IP address and domain, built from how much mail it sends, how many recipients mark it as spam, how many open or reply, and whether it appears on blocklists. Mail from a sender with a good history reaches the inbox; mail from a sender with a bad or empty history gets filtered or refused.

Reputation works best at scale. A provider that sees billions of messages a day can score senders accurately, so users gravitated to the providers with the best filtering, and those providers’ view of who is trustworthy became the one that matters. Today most of the world’s personal mailboxes sit with a few companies — Google, Microsoft, Apple and Yahoo among the largest — and they set the rules everyone else sends by. Since 2024, Gmail and Yahoo require every sender to authenticate its mail and hold bulk senders to stricter rules still; Microsoft followed for Outlook.com in 2025.

Where that leaves us

The protocol is still open. Any server can still receive mail from anyone, and receiving your own mail on your own hardware works well. Sending is the hard part: a new sender has no reputation, and a sender from an address range with a bad history starts below zero. Mail from a server that is configured perfectly can still land in spam or bounce, for reasons the sender cannot see or fix alone. Deliverability explains how that plays out, and what to do about it.

Deliverability

Why mail from a correctly configured server can still land in spam or bounce, what receiving servers actually judge, and how to diagnose a delivery problem.

Three Things a Receiver Checks

When your mail arrives at Gmail, Outlook.com or Yahoo, the receiving server weighs three kinds of evidence:

  1. Configuration — whether the sender is set up correctly. These checks pass or fail, and you control all of them.
  2. Reputation — whether the sender has a history of sending mail people want. You influence it slowly, and only partly.
  3. Content — whether the message itself looks like spam or phishing.

Configuration is the price of entry: fail it and your mail is refused or filtered no matter what. But passing it only proves your mail is really from you. Reputation is what gets it into the inbox.

Configuration

These are the checks a receiver runs on every message. A self-hosted mail server needs all of them; a hosted provider or relay handles most of them for you, leaving only the DNS records to publish.

CheckWhat it provesWhere it’s set
Reverse DNS (PTR)The sending IP address has a name, and that name points back to the same addressWhoever owns the IP: your VPS provider
SPFThe sending server is allowed to send for your domainA TXT record at your domain
DKIMThe message was signed by your domain and not alteredA TXT record, plus signing on the server
DMARCSPF or DKIM passed for the domain in the visible From addressA TXT record at _dmarc.<your domain>
TLSThe connection between servers is encryptedThe sending and receiving servers

Passing these checks does not guarantee inbox placement. Reputation and message content still matter, and other configuration problems, such as malformed headers, can also trigger filtering.

Reputation

Receivers keep a score for every sending IP address and every sending domain. It is built from:

  • History — how long the address and domain have been sending, and how steadily. A brand-new sender has no history, which large providers treat with suspicion.
  • Recipient behavior — how often people open, reply to, or mark your mail as spam, or move it out of spam.
  • Blocklists — whether the address appears on lists such as Spamhaus. Some lists name a single address that sent spam; others name entire ranges, such as home internet connections or a hosting provider’s network.
  • Neighbors — the history of the address range around you. Mail from a range with a lot of past abuse is distrusted before it is read.

Each provider keeps its own score and doesn’t publish it. A sender can be welcome at one provider and refused at another on the same day.

Sending from a home connection

Mail sent directly from a home internet connection almost never reaches inboxes. Most home providers block outgoing port 25 outright. Where they don’t, home address ranges are on policy blocklists that mark them as addresses that shouldn’t be sending mail directly, and large providers honor those lists. A home address also usually can’t have the reverse DNS name receivers expect, because only the internet provider can set it.

Sending from a VPS

A VPS can send on port 25 (some providers require you to ask first) and lets you set reverse DNS, so the configuration checks can all pass. Reputation is the problem:

  • Your address was almost certainly used by someone else before you, and may already be on a blocklist for what they sent.
  • VPS ranges are popular with spammers, so the range around your address may be distrusted as a whole. Microsoft in particular blocks whole hosting ranges.
  • A new address with no sending history is throttled or filtered until it builds one, which takes weeks of steady, wanted mail — and a few low-volume personal senders never get there.
  • Getting off a blocklist means asking each list’s operator, some of which require identifying yourself, and some of which list whole networks and won’t remove a single address.

None of this is under your control, and it can change without warning. That is why we don’t recommend sending directly from your own server for mail that needs to arrive.

What a relay changes

A relay (also called a smarthost or SMTP provider) is a service that delivers your outgoing mail from its own servers, which have an established reputation it works to protect. Your server, or your mail app, hands outgoing mail to the relay; the relay passes it to Gmail, Outlook and the rest. Your domain still signs the mail and still appears as the sender, so recipients see no difference.

Relays police their own customers — limits for new accounts, approval steps, suspension for spam — which is exactly why receivers trust them. A relay is the piece that makes self-hosted mail practical: see Self-Hosting with Stalwart, and SMTP Credentials for setting one up.

Diagnosing a Delivery Problem

Check what the receiver saw

Send a message to a Gmail address you can read, open it, and choose Show original from the three-dot menu. The top of the page shows SPF, DKIM and DMARC, each marked PASS or FAIL, and the full headers below show the IP address your mail came from. Investigate failures against your provider’s configuration instructions. If all three pass, check reputation, content and message formatting rather than assuming authentication guarantees delivery. Google’s sender guidelines describe these separate requirements.

Read the bounce

A rejected message comes back as a bounce with a three-part code and a reason:

  • Codes starting 4 (such as 421 4.7.0) are temporary. The sending server keeps retrying; the receiver is throttling or deferring you, often because it doesn’t know you yet.
  • Codes starting 5 (such as 550 5.7.1) are permanent. The message was refused and won’t be retried. 5.7.x means a policy rejection: the receiver checked something about you and declined.

The text after the code names the check that failed, and large providers often include a link explaining it. Search for the exact text along with the provider’s name.

Useful tools

  • MXToolbox checks DNS records, reverse DNS, and whether an IP address is on the common blocklists.
  • mail-tester.com gives you an address to send a test message to, then scores your configuration and content.
  • Google Postmaster Tools and Microsoft SNDS show how those providers see your domain or IP, once you send enough mail to them to register.

Email and Privacy

Who can read your mail in each kind of setup, what the metadata around it reveals, what encryption does and doesn’t protect, and what it takes to stay anonymous.

Start With Who You’re Hiding From

“Private email” means different things depending on who you want to keep out:

  • Advertisers and data brokers — companies that profile you from what you write and who you write to.
  • Your mail provider — the company that stores your mailbox, and anyone who breaches it.
  • Governments and courts — which can compel a provider to hand over what it holds.
  • Anyone linking your address to you — when the goal is that your mail can’t be tied to your real identity at all.

No setup protects against all four equally, and the setup that is best against one can be worse against another. Decide which matters most before choosing.

The Limit No Setup Removes

Email between two people involves two mail providers: yours and theirs. Unless you and the recipient use end-to-end encryption, writing to someone on Gmail gives Google a readable copy, whatever you use on your end. Most of the people you write to use one of a few large providers, so ordinary unencrypted correspondence with them sits readable in those systems regardless of where you host your own mailbox.

What you control is your side: who holds your mailbox, your contacts and the record of everyone you correspond with.

Content and Metadata

Every message has two parts with different exposure:

  • Content — the body and attachments. Encryption can protect this.
  • Metadata — who sent it, to whom, when, from which IP address, and the subject line. End-to-end encryption still exposes routing information, including sender and recipient addresses and timing. Protection for subjects and other headers depends on the encryption format and the clients or service used.

Metadata alone reveals a great deal: who you talk to, how often, and when. Treat it as no less sensitive than content.

Encryption

In transit. Most mail between large providers now travels over TLS, which stops anyone on the network from reading it on the way. It protects each hop between servers, not the message itself: every server along the way decrypts and handles it in readable form.

At rest. Some providers encrypt stored mailboxes so their own staff can’t read them. Proton encrypts incoming mail as it arrives with a key only you hold; Forward Email stores each mailbox in its own encrypted file unlocked by your password. Either way, mail from outside the service still arrives in readable form and is encrypted on arrival, so the provider handles it unencrypted for that moment.

End to end. Only end-to-end encryption keeps a message’s content unreadable to every server between you and the recipient. It requires the recipient’s cooperation:

  • Between users of the same service — Proton to Proton, Tuta to Tuta — it is automatic.
  • With anyone else, both sides need OpenPGP (built into Thunderbird, and supported by Proton) or S/MIME, and must exchange keys first. Few correspondents use either.

Comparing Setups

SetupProvider can read stored mailWho holds your metadataTies to your identity
Free large provider (Gmail, Outlook)YesThe providerAccount details, phone number, sign-in IPs
Privacy provider, its own address (Proton, Tuta)NoThe providerWhatever you gave at signup
Your domain on a hosted providerDepends on the provider’s encryptionThe providerYour domain, plus account and payment
Self-hosted on StartOS, with a relayNobody but youYou, plus the relay for mail you sendYour domain, VPS and relay accounts

Self-hosting gives the most control over stored mail: no company holds your mailbox or your full correspondence history. Unless messages use end-to-end encryption, the outgoing relay and the recipient’s provider handle readable content. Incoming mail is also readable by the sender’s provider and your own server. Securing the server — physically and with backups you protect — becomes your job.

Anonymity

If you need mail that can’t easily be tied to your real identity, your own domain works against you. A domain is registered and paid for by someone, the registrar knows who, and it appears on every message you send. A VPS and a relay add more accounts and payment records. A proton.me or tuta.com address looks like millions of others.

For anonymity, use a privacy provider’s own address, created over Tor or a VPN without personal details, paid for (if at all) in a way not linked to you, and used only for the purpose it was created for. Know the provider’s limits: a provider can be compelled to log the IP addresses that sign in to an account, and such logs have been handed over to authorities before. Signing in only over Tor keeps your real IP address out of them.

Many people keep both: their own domain for everyday mail, and a separate anonymous address for anything sensitive.

Your Own Domain

Why an address at a domain you own is what actually makes you independent of any mail provider, and what owning one involves.

Independence Is the Address, Not the Server

An address like you@gmail.com belongs to Google. If Google closes your account, changes its terms, or you simply want to leave, the address stays behind — and with it every account, contact and correspondent that knows you by it.

An address like you@yourname.com belongs to you. The provider that hosts it is replaceable: point your domain’s records at a different provider, or at your own server, and the same address keeps working. This is the independence most people are after when they say they want to “own their email,” and it doesn’t require running anything yourself.

What You Need

  • A domain, registered with a domain registrar (Porkbun, Namecheap, Cloudflare and many others) for a yearly fee, typically $10–$20 for common endings like .com. Renew it on time, with auto-renew on: a domain that lapses can be bought by someone else, who then receives your mail.
  • DNS hosting, where your domain’s records live. Most registrars include it.
  • A mail host for the domain: a hosted provider, or your own server. See Email Setups Compared.

The Records Mail Uses

Whoever hosts your mail tells you exactly which records to create; you add them at your DNS host. You’ll meet these:

RecordTypeWhat it does
MXMXNames the server that receives mail for your domain
SPFTXTLists the servers allowed to send mail for your domain
DKIMTXT or CNAMEPublishes the key that verifies your mail’s signatures
DMARCTXTTells receivers how to treat mail that fails SPF and DKIM
VerificationTXTProves to a provider that you control the domain

A domain has one SPF record. When you add a second sender — a relay, a newsletter service — add its include: to the existing record rather than creating another one; two SPF records make both invalid.

Choosing a Domain

  • Your name, or something you’ll keep for life. Changing domains later means changing your address everywhere, which is what this is meant to avoid.
  • A common ending (.com, .net, .org, or your country’s) is trusted more readily by spam filters than an unusual one.
  • Use a separate domain for experiments. If you want to try self-hosting, a spare domain keeps a mistake from affecting the address everyone knows.

Switching Providers Later

Because the address is yours, moving to another provider is a change of DNS records:

  1. Set up the domain and mailboxes at the new provider.
  2. Change the MX record (and SPF, DKIM and DMARC) to the new provider’s values.
  3. Move your existing mail across. See Moving Your Mail.

Mail sent while DNS changes spread is not lost: it goes to whichever provider the sender’s server finds, so check both mailboxes for a few days.

Email Setups Compared

Every common way to run your email, side by side: who holds your mail, whether it reliably arrives, what it costs, and how much work it takes.

At a Glance

SetupYour own addressMail arrives reliablyWho holds your mailboxEffortTypical cost
Free large providerNoYesThe providerNoneFree
Privacy provider, its own addressNoYesThe provider (encrypted)NoneFree or a few $/month
Forwarding onlyYesYesYour existing providerLowFree
Your domain on a hosted providerYesYesThe providerLowDomain + a few $/month
Self-hosted, sending through a relayYesYesYouHighDomain + VPS + relay
Self-hosted, sending directlyYesNoYouHighestDomain + VPS

Free Large Provider

Gmail, Outlook.com, iCloud Mail, Yahoo.

  • Good: free, reliable, excellent spam filtering, every app supports them.
  • Bad: the provider reads and stores everything in readable form, and you’re subject to its terms. The address isn’t yours: losing the account loses the address.

Privacy Provider, Its Own Address

Proton Mail (proton.me), Tuta (tuta.com).

  • Good: stored mail is encrypted so the provider can’t read it; end-to-end encryption with other users of the same service; can be signed up for anonymously. The best option for anonymity.
  • Bad: the address still belongs to the provider. Using a desktop mail app takes extra steps: Proton’s IMAP access needs its Bridge app on a paid plan, and Tuta works only in its own apps.

Forwarding Only

A forwarding service (Forward Email’s free plan, among others) receives mail at your domain and passes it on to an existing mailbox, such as your Gmail.

  • Good: you get your own address immediately, keep the inbox you’re used to, and can later switch to full hosting without changing the address.
  • Bad: your mail still ends up at your existing provider, and replies go out from that provider’s address unless you add sending (which is no longer free).

Your Domain on a Hosted Provider

Forward Email, Proton (custom domain), Fastmail and others host full mailboxes on your domain. Client support varies: Forward Email and Fastmail support standard IMAP clients, while Proton requires its Bridge for desktop IMAP access on a paid plan, or its own mobile apps.

  • Good: an address you own, mail that arrives, no servers to run. Forward Email and Proton encrypt stored mail to prevent provider access; this is not a guarantee every privacy-focused host makes. Switching provider later is a DNS change.
  • Bad: a company still holds your mailbox. Fastmail’s servers can read stored mail despite disk encryption (see its security explanation). Without end-to-end encryption, providers also handle readable messages in transit.

This is what we recommend for most people. See Hosted Email on Your Domain.

Self-Hosted, Sending Through a Relay

Stalwart on StartOS stores your mail and receives it directly from other servers through a public IP address on a StartTunnel VPS. Outgoing mail is handed to a relay, which delivers it from servers with an established reputation.

  • Good: your mailbox, contacts and calendars live on your own hardware; no company holds your correspondence history. Delivery is as reliable as the relay’s.
  • Bad: you run a VPS, a domain, DNS records and the server, and keep all of them up. The relay sees every message you send. Spam filtering, backups and security are yours.

See Self-Hosting with Stalwart.

Self-Hosted, Sending Directly

The same server, but delivering outgoing mail itself instead of through a relay.

  • Good: no third party handles your outgoing mail.
  • Bad: your mail’s arrival depends on the reputation of your server’s IP address, which you can’t control. From a home connection it generally won’t arrive at all; from a VPS it often lands in spam or is refused, especially at Microsoft. See Deliverability.

We don’t recommend this for mail that needs to arrive.

Mail From Your Services

Separate from your personal mail, services on StartOS — Nextcloud, Vaultwarden, Gitea and others — send notifications and password resets. They need SMTP credentials for an account that can send mail. Any of the setups above that includes sending can provide them, or you can use a dedicated sending service. See SMTP Credentials.

Recommendations

What we suggest for individuals, families, small businesses, people who need anonymity, and people who want to run their own mail server.

Most People: Your Domain, Hosted

Register a domain and host it on Forward Email, read in Thunderbird. You get an address you own, mail that arrives, stored mail the provider can’t read, and no mail server to maintain. If you later want to self-host, or change provider, the address comes with you.

We recommend Forward Email: it is open source, encrypts each mailbox with your password, and its paid plans include unlimited addresses on a domain. Proton with a custom domain is a good alternative if many of the people you write to use Proton, since mail between Proton users is end-to-end encrypted.

See Hosted Email on Your Domain.

Trying It Out: Forwarding First

Not ready to leave your current inbox? Register a domain and use free forwarding to send its mail to the mailbox you already have. Give out the new address as you go. When you’re ready, upgrade to full hosting; nothing about the address changes.

Families

One domain, an address for each person, on one hosted plan. Forward Email’s paid plans include unlimited addresses and pooled storage on a domain, so a whole household fits on one plan. Each person gets their own mailbox and password, and shared addresses (family@, bills@) can forward to several people.

Children’s addresses can be created and removed as they grow, and an address can outlive the person’s use of it — forwarding on, rather than bouncing.

Small Businesses

Your business domain on a hosted provider. For a business, mail that doesn’t arrive is lost money, and mail that’s down is a business that’s down. Choose a provider for reliability and administration features (shared mailboxes, adding and removing staff, recovering an account when someone leaves) and keep the domain in an account the business, not an employee, controls.

Keep sending from your services and newsletters separate from staff mail: use a dedicated sending service for bulk or automated mail, so a problem there never affects your team’s ability to email clients. See SMTP Credentials.

We don’t recommend self-hosting a business’s primary mail unless someone is responsible for keeping it running.

Anonymity

A privacy provider’s own address, created over Tor, with no domain. Your own domain ties your mail to whoever registered and paid for it. See Email and Privacy. Keep the anonymous address strictly separate from your everyday one.

Running It Yourself

Stalwart on StartOS, receiving through StartTunnel and sending through a relay. This is for people who want their mailbox, contacts and calendars on their own hardware, and are willing to look after a VPS, DNS records and a server to get it.

  • Use a relay for outgoing mail. Sending directly is not worth it — see Deliverability.
  • Consider a spare domain while you learn, and move your main address over once it’s been running reliably for a while.
  • Back up the server, and keep the backups somewhere that isn’t the server.

See Self-Hosting with Stalwart.

Hosted Email on Your Domain

Host your own domain’s mail on Forward Email and read and send it from Thunderbird on your computer and phone — the setup we recommend for most people.

What You’ll Need

  • A domain you control. See Your Own Domain.
  • A Forward Email paid plan. The free plan only forwards; storing mail and sending from your domain need a paid plan. See Forward Email’s pricing.
  • Thunderbird on your computer, and a mail app on your phone (Thunderbird for Android, or the phone’s built-in mail app).

Other hosted providers work the same way in outline: add your domain, publish the records they give you, create mailboxes, and point a mail app at their servers.

1. Add Your Domain to Forward Email

  1. Create a Forward Email account and add your domain under My Account › Domains.
  2. Choose a paid plan for the domain.
  3. Add the DNS records Forward Email lists — the verification record, MX records, SPF, DKIM, DMARC and return path — at your DNS host, exactly as shown. Forward Email’s FAQ walks through each one, with instructions for most DNS hosts.
  4. Back on the domain’s page in Forward Email, verify the records.

If you already receive mail at this domain somewhere else, changing the MX records moves delivery to Forward Email. Bring your existing mail along first — see Moving Your Mail.

2. Create Your Mailboxes

  1. In Forward Email, open the domain’s Aliases and create an alias for each address, such as you@yourdomain.com.
  2. Click Generate Password next to the alias. Save the password somewhere secure, such as your Vaultwarden password manager: it is also the key to your encrypted mailbox, so losing it loses the mail stored there.
  3. Request outbound SMTP for the domain if Forward Email hasn’t enabled it yet. Forward Email approves sending for each domain, often automatically once your records verify, otherwise usually within a day.

Repeat for each person or address on the domain.

3. Set Up Thunderbird

  1. In Thunderbird, add a new mail account with your name, address and the generated password.

  2. When Thunderbird offers settings, choose Configure manually and enter:

    SettingIncoming (IMAP)Outgoing (SMTP)
    Serverimap.forwardemail.netsmtp.forwardemail.net
    Port993465
    Connection securitySSL/TLSSSL/TLS
    AuthenticationNormal passwordNormal password
    Usernameyour full addressyour full address
  3. Click Done, then send yourself a test message and reply to it from another account.

Forward Email also provides calendars and contacts over CalDAV and CardDAV, which Thunderbird can sync alongside your mail. See Forward Email’s client setup for the addresses.

4. Set Up Your Phone

Add the same account to your phone’s mail app with the same servers, ports and password. On Android, Thunderbird for Android is available from Google Play and F-Droid; on iPhone, the built-in Mail app works with the settings above.

Sending Mail From Your Services

The same alias and password can send notifications from StartOS and its services. See the Forward Email tab in SMTP Credentials. A separate alias, such as no-reply@yourdomain.com, keeps those messages apart from your own.

Self-Hosting with Stalwart

How a mail server on StartOS fits together — receiving through a public address, sending through a relay — and what you take on by running one.

Is This for You?

Self-hosting puts your mailbox, contacts and calendars on your own hardware, so no company holds your correspondence history. In exchange, you keep a server, a VPS, a domain and its DNS records running, and when something breaks, there’s no provider to fix it. If what you want is an address you own and mail that arrives, Hosted Email on Your Domain gets you there with far less work.

How It Fits Together

A self-hosted setup on StartOS has four parts:

  • Stalwart on your StartOS server: the mail server. It receives and stores mail, serves it to your apps over IMAP and JMAP, and holds calendars and contacts over CalDAV and CardDAV. Everything lives in one database that StartOS backs up.
  • A public IP address for other mail servers to deliver to. Home connections rarely work: most block port 25, and many share one address among several customers. A StartTunnel gateway on a VPS gives your server a public address of its own, without revealing your home address.
  • A relay that delivers your outgoing mail from servers with an established reputation. See Deliverability for why sending directly from your own address isn’t reliable, and SMTP Credentials for getting relay credentials.
  • Your domain’s DNS records, pointing incoming mail at your public address and authorizing your server and your relay to send. Stalwart’s Show DNS Records action lists them.

Mail flows like this:

  • Incoming: a sender’s server looks up your MX record, connects to port 25 on your StartTunnel VPS, and the tunnel carries the connection to Stalwart.
  • Outgoing: your mail app hands the message to Stalwart; Stalwart signs it with your domain’s DKIM key and hands it to the relay; the relay delivers it.
  • Reading: your apps connect to Stalwart over the same public address — or over your local network or a VPN.

Setting It Up

Stalwart’s instructions on StartOS walk through every step: choosing the gateway, publishing the mail ports, the DNS records and the relay. Install Stalwart from the StartOS Marketplace and follow its Instructions tab, or read them on GitHub.

Tip

Set it up on a spare domain first. Move your main address over once the server has been running reliably for a few weeks.

What You Take On

  • Uptime. If your server, your home connection, the VPS or your DNS goes down, so does your mail. Short outages lose nothing: senders’ servers keep messages and retry, typically for several days. Longer outages bounce mail back to its senders.
  • Backups. Your mail exists only on your server and in your backups. Keep a backup off the server, and test restoring it.
  • Security. Your server holds everyone’s mail on the domain, and its mail ports face the internet. Keep StartOS and Stalwart updated, use strong passwords and two-factor sign-in in Stalwart’s Account Manager, and keep the Admin Console off the public internet (Stalwart on StartOS does this by default).
  • Spam. Stalwart filters incoming spam itself. Expect to tune it at first.
  • Your relay and VPS accounts. Both are third parties in the path of your mail. The relay handles every message you send. WireGuard encrypts the connection between StartOS and the VPS, not the VPS’s connections to other mail servers. On that public leg, SMTP can be plaintext when the sender does not use STARTTLS; the VPS provider can read that traffic. End-to-end encryption protects message content independently of these transport connections.

Outages at Big Providers

When Microsoft or Google has an outage, your own server keeps working: you can still read your mail and send messages. Mail to people at the affected provider waits in the queue and is delivered when it recovers, and their mail to you arrives late for the same reason. You’ve traded the large provider’s points of failure for your own, not removed them.

SMTP Credentials

Get credentials for an account that can send mail — from Forward Email, Amazon SES, Gmail, Mailgun, Proton Mail or SendGrid — for StartOS, a Stalwart relay, or any app.

What They’re For

SMTP credentials let software hand mail to a provider for delivery. You need them for:

  • StartOS and its services — Nextcloud, Vaultwarden, Gitea and others send notifications and password resets. Enter the credentials once under System › SMTP in StartOS, then point each service at them. See SMTP in the StartOS docs.
  • A Stalwart relay — Stalwart hands your outgoing mail to the provider, which delivers it from its established servers. The credentials must authorize every From address the server will use; a credential for one alias cannot necessarily relay mail for the whole domain. See Using a Relay for a Whole Domain and the relay section of Stalwart’s instructions.
  • Any other app that sends mail, with the same values.

Every provider gives you the same handful of values: a host, a port and connection security, a username and password, and the From address you’re allowed to send as.

Choosing a Provider

We recommend Forward Email: it is open source and privacy-focused, and sends from your own domain. If you already host your domain’s mail there (see Hosted Email on Your Domain), you already have what you need.

  • Sending as your own domain looks more trustworthy to recipients and keeps working if you change providers. Forward Email, Amazon SES, Mailgun, SendGrid and Proton all support it.
  • Gmail is the quickest to set up if you have an account, but sends only as your Gmail address.
  • Amazon SES, Mailgun and SendGrid are built for apps sending in volume: newsletters, a business’s automated mail.

Getting Credentials

To use Amazon SES you will need:

  • An Amazon Web Services (AWS) account. If you don’t have one, you can register here for free.
  • Amazon Simple Email Service (SES) set up from inside your AWS console, free for a time within certain limits.
  • A verified identity to send from: either your own domain name (add the DNS records Amazon gives you) or a single email address, under Identities in the SES console.

New SES accounts start in the sandbox, which can only send to addresses you have also verified. To send to anyone else, request production access from the SES Account dashboard.

  1. Open the SES console and check the region selected in the top bar. Credentials, verified identities, and the SMTP host are all specific to this region, so use the same one throughout.

  2. Choose SMTP settings in the left navigation pane. The page shows two cards: Mail Manager SMTP (marked “Recommended”) and IAM SMTP credentials.

  3. In the IAM SMTP credentials card, click Create IAM credentials. The IAM console opens. Do not use the Mail Manager card’s Create SMTP credentials button: it creates an ingress endpoint, a separately billed product that is not needed.

  4. Enter a user name (or keep the default) and click Create user.

  5. Click Show under SMTP password, then Download .csv file. The SMTP user name and password are shown only once; save them somewhere secure, such as your Vaultwarden password manager. The user name is an access key ID (starts with AKIA); the password is not your AWS secret access key.

  6. Use these values:

    ParameterValue
    Hostemail-smtp.<region>.amazonaws.com, e.g. email-smtp.us-east-1.amazonaws.com
    Connection SecurityTLS
    Port465
    From Addressan address at your verified domain, or your verified email address
    Usernameyour SMTP user name (from above)
    Passwordyour SMTP password (from above)

    Note

    Replace <region> in the Host with the region you created the credentials in, e.g. email-smtp.eu-west-1.amazonaws.com. The SMTP settings page in the SES console shows the exact hostname for that region. For STARTTLS instead, use port 587.

Using a Relay for a Whole Domain

Choose credentials that authorize all of the domain’s sending addresses. Forward Email’s alias password above authorizes only that alias: putting it in Stalwart’s default relay route rejects other users’ From addresses. Forward Email offers domain-wide catch-all passwords for SMTP sending; follow its documentation for obtaining domain-wide credentials. Alternatively, configure separate authenticated relay routes for each sending alias. Protect domain-wide credentials as secrets that can send as anyone on the domain.

Publish every DNS record the relay provider requests, including its DKIM and verification records where required. Add the provider to the domain’s SPF record with the include: value it gives you, keeping a single SPF record. See Your Own Domain.

Moving Your Mail

Bring your existing mail to a new provider or your own server, and run your old and new addresses side by side while everyone catches up.

Copying Mail Between Accounts

The simplest way to move mail is through Thunderbird, which can hold both accounts at once:

  1. Add your old account and your new account to Thunderbird, both over IMAP.
  2. Let the old account finish downloading. In the old account’s settings, under Synchronization & Storage, keep its messages on this computer so every folder downloads in full.
  3. Create matching folders in the new account, then select the messages in each old folder, right-click and choose Copy To, and select the matching new folder. Ordinary dragging moves messages and removes them from the old account.
  4. Check the message counts in each folder match before you delete anything from the old account.

Thunderbird uploads each copied message to the new server, so a mailbox of many gigabytes takes hours. Leave it running.

For very large mailboxes, or many accounts at once, imapsync copies between two IMAP servers directly and can resume after an interruption.

Gmail

Gmail’s labels appear as folders over IMAP, and a message with several labels appears in each of them. Copy All Mail if you want everything exactly once, or copy label folders if you want your organization preserved and don’t mind duplicates.

For an offline copy instead, Google Takeout exports your mail as an .mbox file, which Thunderbird can import with the ImportExportTools NG add-on.

Moving an Address You Already Receive Mail At

If your domain already receives mail somewhere, the switch happens when you change its MX record:

  1. Set up the new provider or server completely, including mailboxes, before touching the MX record.
  2. Copy your existing mail across, as above.
  3. Change the MX record, and the SPF, DKIM and DMARC records, to the new values.
  4. Keep the old mailbox for a week. Some senders will still deliver there until DNS changes spread, so check it, and copy across anything that arrived late.

Mail is not lost during the switch: each sender delivers to whichever server its DNS lookup returns at the time.

Changing to a New Address

Moving from an address you don’t own, like you@gmail.com, to one at your own domain can’t happen all at once. Run them side by side:

  • Forward the old address to the new one. Gmail, Outlook.com and most providers can forward incoming mail automatically, so you only need to check one mailbox.
  • Update your accounts gradually. Change your address at banks, shops and services as you next use them, starting with the ones that matter most — anything used to reset passwords.
  • Tell people as you reply. Answer from your new address; most correspondents switch on their own.
  • Keep the old account open. Leave it forwarding for a year or more, so nothing sent to it is lost and you can still reset any account you forgot to update.