Mail relay: review round 2 — the store is keyed by host, a copied database does not enrol by itself

- Q-1 one entry per host (iapl:mail-relay:site:<host>); a read never deletes or writes; another host's
  entry is neither used nor touched (a developer's process on the live database, www and apex, a copy)
- a database that holds another host's connection and none of this site's does not enrol by itself:
  "Connect again" does, once; mail.relay.otherHosts ('wait' | 'enrol' | the site's own other hosts);
  panel text and doctor finding; a site with an empty store enrols by itself as before
- Q-2 the file limit answers from what is stored and never asks the service
- Q-3 a file whose mail was not confirmed is not reported as a wrong file, and no notice mail follows
- Q-4 its own text when the access-key field is off
- D-1 docs for open enrolment; staging, copies and several hosts

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-25 23:14:11 +01:00
co-authored by Claude Fable 5.2
parent edee3a321f
commit 85ed92bb89
31 changed files with 467 additions and 211 deletions
+6
View File
@@ -59,6 +59,12 @@ export const mailRules: DoctorRule[] = [
out.push({ fix: 'contact Intecion; meanwhile an SMTP server in the panel sends the site\'s mail', message: 'Intecion has stopped e-mail sending for this site (suspended)', severity: 'error' })
} else if (relay.state === 'pending') {
out.push({ fix: 'Intecion approves the host on the service (`ims approve <host>`); the same token then works', message: 'the site is enrolled with the Intecion mail service but waits for approval: e-mails are not sent yet', severity: 'warning' })
} else if (!relay.connected && relay.refusal === 'client-other-host') {
out.push({
fix: 'if this site should send e-mails: Site integrations → E-mail sending → "Connect again" (once); a moved domain or a second domain of the same site: mail: { relay: { otherHosts: [\'old-domain.example\'] } }; a staging copy that must not send: mail: { relay: false } or SMTP to a catcher',
message: `the database holds the mail-service connection of another site (${relay.reason ?? 'another host'}) and none of this one — a copied database or a new domain: the site does not connect by itself, e-mails are not sent`,
severity: 'warning',
})
} else if (!relay.connected && relay.refusal) {
const path = relay.refusal === 'callback-failed' ? ` (${relay.reason ?? 'unknown'}): the service could not confirm the site at its public address` : ''
out.push({