Skip to content

Several Domains

Anton Popov edited this page Nov 10, 2026 · 1 revision

Several Domains, One Install

One goodmail can serve any number of mail domains. List them all in one domainN= line (comma separated), or one line per domain when they use different servers, and give each domain a host name of the form goodmail.<domain> (or any <name>.<domain>):

domain1=example.com, example.org, example.net
imap1=mail.example.com
smtp1=mail.example.com:587
  • Login by host. On goodmail.example.org a login without @ is completed with that domain (bo becomes bo@example.org); everywhere else defaultdomain applies. Full addresses always work, on any host.
  • DNS and web server. Point goodmail.<domain> at the server (A/AAAA; DNS-only if the zone is behind Cloudflare), add every host name as a ServerAlias of the one virtual host, and put them all on one certificate. A working example is deploy/apache-multidomain.conf in the repository. Keep ProxyPreserveHost On.
  • Passkeys are per host name (a WebAuthn rule): a passkey created on goodmail.example.org does not work on goodmail.example.com. Do not set GOODMAIL_ORIGIN when you serve several hosts, because it pins one.
  • Titles can differ per domain (titleN, titleN.<lang>), see Configuration.

Clone this wiki locally