Shared service servers and outgoing mail
A server belongs to one pool. For websites, databases and mail that is exactly right, but two kinds of server serve more than one: a secondary nameserver answers the zones of all your pools, and a backup server keeps the backups of all your
Written for: Administrator
A server belongs to one pool. For websites, databases and mail that is exactly right, but two kinds of server serve more than one: a secondary nameserver answers the zones of all your pools, and a backup server keeps the backups of all your pools. And a web server without the mail role has to send its websites' mail somewhere. You set up all three in the same place.
You find it under Servers → a server → Placement.
Sharing a server with other pools
The Shared service server card appears on a server with the DNS or Backup role.
- Tick the roles to share: DNS (secondary nameserver), Backup, or both.
- Tick the pools this server should serve as well.
- Press Save. The panel asks for your second factor when it needs to.
New accounts in those pools then get this server automatically: the nameserver joins their nameserver set, the backup server becomes their backup target. The card says how many other pools the server serves.
The panel refuses what does not fit, and says why:
- Only a secondary nameserver can share DNS. Put the server in a nameserver set first (Servers → Nameserver sets). Sharing a primary would send every pool's zones to that one machine.
- Only DNS and backup can be shared. A website, database or mailbox lives in one pool.
- The server must really carry the role, and the role must not be internal (see below).
To stop, press Stop sharing. The server serves its own pool only again; what is already linked keeps working.
Internal roles
A mail server set up with the mail-dedicated profile also has a database (for the mail tables) and a web server (for webmail and the server's certificate). Those two are internal: the page says so in a notice, and the panel never places customer websites or databases on them — not even when somebody picks the server by name.
Outgoing mail from a web server without the mail role
The Outgoing mail card appears on a web server without the mail role. Mail its websites send (with PHP mail(), for example) goes through a mail server, which signs and delivers it.
- Under Pick a mail server, choose the mail server. The panel suggests the one the pool would pick for mail.
- Press Send through this mail server.
The panel sets up both ends: the mail server lets this web server relay, and the web server sends its mail there from now on. According to the server shows what the web server reports; Matches means the two agree.
Usually you do not have to do this yourself: as soon as an account on such a web server gets its mail on another server, the panel sets it up automatically.
Good to know:
- The mail server only relays mail from the domains of accounts that live on this web server and have their mail on that mail server (and the web server's own name, for system mail). For domains shows the list. Other senders are refused — other customers of the same mail server included.
- When you add a domain later, press Send through this mail server once more to update the list; until then mail from that domain is refused.
- The SPF record of such a mail server names the mail server itself, so receivers trust the mail.
- One web server sends through one mail server. A domain whose mail lives on a different mail server is refused by the chosen one.
Stop removes the link on both ends. Websites on that server can no longer send mail: a message comes straight back saying no mail server is set.
From the terminal
On the mail server:
corectl mail relay-client add web1.example.net --ip 192.0.2.10,2001:db8::10 --domain shop.example.net
corectl mail relay-client list
corectl mail relay-client remove web1.example.netOn the web server:
corectl mail relayhost set mail1.example.net
corectl mail relayhost show
corectl mail relayhost clearMaking a role internal or offering it again, on the server itself:
corectl role placement db --placeable off
corectl role placement db --placeable on