Email

How outbound transactional mail works on TurboStack, and how to ensure deliverability with SPF, DKIM, and DMARC DNS records.

TurboStack is primarily an application-hosting platform. Outbound (transactional) mail is handled by the local mail service on your host. Domain authentication (DKIM) and a development mail-catcher are set up under the host's Advanced > Mail Settings (Advanced).

Mail Settings on the host's Advanced tab
Mail Settings on the host's Advanced tab

Sending mail

Your applications send through the local mail service by default - no external SMTP credentials are required for basic delivery. To keep that mail out of spam folders, publish the DNS records below (SPF, DKIM, DMARC). For high-volume or marketing mail, use an external SMTP provider instead.

Common email ports

When you configure an application's outbound mail or a desktop mail client, use these standard ports. Simple Mail Transfer Protocol (SMTP) sends mail; Internet Message Access Protocol (IMAP) and Post Office Protocol version 3 (POP3) read it.

Service Port Encryption
SMTP submission (from a client) 587 STARTTLS
SMTP submission (implicit TLS) 465 Transport Layer Security (TLS) on connect
SMTP (server to server) 25 opportunistic
IMAP 143 STARTTLS
IMAP over TLS 993 TLS on connect
POP3 110 STARTTLS
POP3 over TLS 995 TLS on connect

Prefer the encrypted submission ports (587 with STARTTLS, or 465 with implicit TLS) for sending from an application. Port 25 is for server-to-server delivery, not client submission.

Deliverability (DNS records)

To land in inboxes rather than spam folders, authenticate your domain with three Domain Name System (DNS) records. Add these where you manage your domain's DNS. If Hosted Power manages your DNS, add them in the Customer Center DNS management; otherwise add them at your DNS provider - see Connecting your domain.

Record Type Purpose
Sender Policy Framework (SPF) TXT Authorises the server to send mail for your domain.
DomainKeys Identified Mail (DKIM) TXT Cryptographically signs your mail - use the selector and key from Mail Settings.
Domain-based Message Authentication, Reporting and Conformance (DMARC) TXT Sets the policy for how receivers handle messages that fail SPF or DKIM.

Set up DKIM

DKIM signs your outbound mail so receiving servers can confirm it genuinely came from your domain. Set it up from the host's Advanced > Mail Settings:

  1. Enter the Fully Qualified Domain Name (FQDN) you send mail from.

  2. Choose a selector - this becomes the subdomain part of the DKIM record.

  3. Connect over SSH and run tscli dkim records to get the DKIM record to publish.

  4. Add that record as a TXT record in your domain's DNS - in the Customer Center DNS management if Hosted Power manages your DNS, otherwise at your DNS provider.

  5. Back on the server, run tscli dkim validate to confirm the record was created correctly.

SPF record syntax

An SPF record is a single DNS TXT record that starts with v=spf1, lists the mechanisms that authorise senders, and ends with an all mechanism. Each mechanism carries a qualifier that sets the result when it matches.

Qualifier Result Meaning
+ pass Authorised (the default when no qualifier is written)
- fail Not authorised; reject
~ softfail Probably not authorised; accept but mark
? neutral No statement
Mechanism Matches
ip4: / ip6: A specific IPv4 or IPv6 address or range
a / mx The domain's A record(s) or MX host(s)
include: The SPF record of another domain, for a third-party sender
all Everything; put it last, as -all or ~all

Examples:

v=spf1 mx -all
v=spf1 ip4:203.0.113.10 include:example.net -all

Keep one SPF record per domain and stay within the 10-lookup limit - see Mail deliverability.

Development mail

Mailpit and Mailhog are development mail-catchers that capture outbound mail so you can inspect it without delivering it. Enable one from Advanced > Mail Settings (the mail capturing/testing option); it is then reachable at https://<hostname>/mailpit or https://<hostname>/mailhog with your system user's credentials. Mailpit is recommended (Mailhog is no longer maintained).