Tenant Domain Setup Guide

Use this guide when a customer or tenant admin is preparing a domain for mail service in Email Reseller Server.

For Postfix routing, mail event imports, queues, service checks, backups, and other production operations, use the Server Operator Guide.

Who Does What

TaskTenant admin or domain ownerSuper AdminServer operator
Choose the tenant domainYesCan verifyNo
Add DNS records at the domain DNS hostYesCan adviseSometimes
Create the tenant in the appNoYesNo
Approve IMAP/SMTP hostnamesNoCan requestYes
Create users and aliasesYes, inside own tenantYesNo
Generate or install DKIM signing keyNoCan requestYes
Provide DKIM public TXT value to tenantNoYesYes
Upload S/MIME identity for own accountYesYesNo
Upload S/MIME identity for usersRegular users in own tenant onlyYesNo

Information To Collect First

Required DNS Records

Replace example.com, mail.example.com, and 203.0.113.10 with the tenant's real values.

TypeNameValuePurpose
Amail203.0.113.10Points the mail hostname to the mail server.
MX@10 mail.example.comSends inbound mail for the domain to the mail server.
TXT@v=spf1 mx -allAuthorizes the domain's MX hosts to send mail.
TXTdefault._domainkeyDKIM public key from the server operatorLets receivers verify signed outbound mail.
TXT_dmarcv=DMARC1; p=quarantine; rua=mailto:dmarc@example.comPublishes domain policy and reporting address.
Start DMARC with p=none while testing if the domain is new or existing senders are still being discovered. Move to quarantine or reject only after SPF, DKIM, and legitimate sending paths are confirmed.

DKIM Public Key

DKIM has two parts: the private signing key stays on the mail server, and the public DNS key is added as a TXT record by the domain owner. Tenants should not receive or upload the private DKIM key.

The server operator or Super Admin should provide the tenant with:

Type: TXT
Name: default._domainkey.example.com
Value: v=DKIM1; k=rsa; p=<public-key-text>

The selector in the name, such as default, must match the server's OpenDKIM configuration.

Optional But Recommended DNS Records

MTA-STS

Type: A
Name: mta-sts
Value: 203.0.113.10

Type: TXT
Name: _mta-sts
Value: v=STSv1; id=20260521T000000Z

The policy must also be reachable at:

https://mta-sts.example.com/.well-known/mta-sts.txt

Use mode: testing first, then move to enforce after reports look healthy.

TLS-RPT

Type: TXT
Name: _smtp._tls
Value: v=TLSRPTv1; rua=mailto:tls-rpt@example.com

Use a mailbox that an admin or Super Admin can review.

Tenant Setup In The App

Only a Super Admin can create a tenant.

  1. Log in as a Super Admin.
  2. Open Admin Panel, then Tenants.
  3. Click Server Setup Wizard and confirm the approved IMAP/SMTP hosts.
  4. Click Add Tenant.
  5. Enter the organization name, primary domain, approved IMAP/SMTP hosts, ports, user limit, and storage limit.
  6. Save the tenant.
  7. Create or assign a Tenant Admin for that tenant.

Mailbox User Setup

  1. Tenant Admin opens Admin Panel, then Users.
  2. Click User Wizard or Add User.
  3. Enter the mailbox address, such as support@example.com.
  4. Generate a temporary password.
  5. Leave mailbox credentials blank when this deployment should provision the local mailbox automatically.
  6. Give the temporary password to the user through a secure channel.

The user should sign in, click Password, and choose their own password. On provisioned local mailboxes, this also updates the IMAP/SMTP mailbox password.

Alias Setup

Aliases are managed in the app, but the mail server must also route them correctly. Seeing an alias in the portal confirms the app database mapping; it does not, by itself, prove Postfix is routing production inbound mail to that mailbox.

  1. Open Admin Panel, then Aliases.
  2. Click Add Alias.
  3. Enter the alias address, such as sales@example.com.
  4. Choose the destination user.
  5. Save.
  6. Send a test message to the alias.
  7. Ask the server operator to confirm the Postfix route maps the alias to the intended mailbox.
  8. Confirm mail event logs show the alias as the original recipient and the destination mailbox as delivered.

Operators can import recent Postfix send/receive metadata into the app database without message bodies:

cd /home/jason/email-servers/emailresellerserver
node scripts/import-mail-events.js --since-minutes=1440 /var/log/mail.log

S/MIME Identity Setup

S/MIME is different from DKIM. DKIM signs the domain's outbound mail at the server level. S/MIME signs or encrypts a user's individual messages with that user's certificate.

For S/MIME signing, the user or admin needs an S/MIME certificate issued for the user's email address, the matching private key as PEM material or inside an exportable PKCS#12/PFX bundle, and the optional private key passphrase.

  1. Log in as the user.
  2. Click S/MIME in the top bar.
  3. To import a .p12 or .pfx bundle, choose it under Import PKCS#12 / YubiKey Backup, enter the bundle passphrase if required, and click Import Bundle.
  4. To paste PEM material manually, paste the certificate PEM and matching private key PEM.
  5. Enter the private key passphrase only if the key requires one.
  6. Click Save S/MIME Identity for manual PEM setup.

YubiKey Quick Start

  1. Plug in the YubiKey.
  2. Log in to the account you want to protect.
  3. In the portal, open MFA and use Security Key / YubiKey > Add YubiKey.
  4. Follow the browser prompt and touch the YubiKey when it flashes.
  5. Set up a spare YubiKey so the user is not locked out if one key is lost.
Every service names these options a little differently. Start with Yubico's YubiKey setup guide, then use the Works with YubiKey catalog for service-specific setup support. YubiKey Manager can inspect and configure FIDO2, OTP, and PIV functionality on Windows 11, macOS, and Linux.
Before enrolling keys, operators should confirm WEBAUTHN_RP_ID matches the portal host domain and WEBAUTHN_ORIGIN matches the exact HTTPS origin users visit.
Current portal S/MIME supports imported PEM or exportable PKCS#12/PFX identities for server-side signing. YubiKey WebAuthn login is supported for account protection. Hardware-backed YubiKey S/MIME signing is a separate feature where the private key stays on the YubiKey and the signing operation happens on the device. Private keys generated on the device, or imported as non-exportable keys, cannot be extracted for the current server-side signing flow.
A YubiKey-held public certificate can still be exported for recipient encryption. Use YubiKey Manager or ykman piv certificates export --format pem 9c jason@mail.visasvista.com.pem, using the certificate owner's email address in the filename, then save that public certificate under the matching recipient address in S/MIME Settings > Recipient Certificates. The private key remains on the YubiKey.
Recipient certificates may be pasted as PEM text or loaded from public certificate files such as .pem, .cer, .crt, or .der. Treat certificates attached to email as public recipient certificates only; do not import private signing keys from email attachments.
Do not upload another user's private key into your own account. The certificate email address must match the account email address.

External Mail Client Details

SettingTypical value
Account typeIMAP
Email addressFull mailbox address
UsernameFull mailbox address, unless the admin says otherwise
PasswordCurrent webmail/mailbox password
Incoming hostmail.example.com
Incoming port993
Incoming securitySSL/TLS
Outgoing hostmail.example.com
Outgoing port587
Outgoing securitySTARTTLS
Outgoing authenticationRequired

Go-Live Checklist

Troubleshooting

ProblemWhat to check
Tenant cannot be created with desired hostThe host must be in the approved mail-server allow-list.
Mail does not arriveCheck MX, local mailbox provisioning, aliases, and mail logs.
Outbound mail lands in spamCheck SPF, DKIM, DMARC, PTR, and sending reputation.
DKIM failsConfirm selector name and TXT value match OpenDKIM.
Mail client cannot sign inConfirm username, password, IMAP host, port, and TLS mode.
S/MIME signing disabledConfirm certificate/key match, certificate is valid, and server S/MIME runtime is configured.