Mail relay: development hosts are known by pattern, with no env - built in: *.dev.netscale.pl
The launch rule called a site non-public only when IAPL_NOINDEX was set (or the project named its hosts).
The owner's development sites set nothing, so production's database copied onto a development address
counted as a launch and would have mailed real people.
- iapl({ developmentHosts }): host patterns of development addresses. Default DEFAULT_DEVELOPMENT_HOSTS =
['*.dev.netscale.pl'], Intecion's own development domain; a project replaces the list or empties it.
mail.relay.developmentHosts overrides it for the mail service.
- a site whose host matches is non-public exactly as with IAPL_NOINDEX=1; either signal is enough
- siteNonPublicSignal, matchDevelopmentHost, isDevelopmentHost, pluginDevelopmentHosts exported
- panel state: nonPublicBy, nonPublicPattern; doctor: mail-non-public (info) names the signal
- every case of the launch table runs with no env on the built-in pattern
- docs, AGENT.md, skills, changelog draft
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
634908eb57
commit
14abf369da
+9
-7
@@ -1290,14 +1290,16 @@ the mail service → nothing (`mail: { relay: false }` and no SMTP). A site with
|
||||
approval, is the exception — the panel says so).
|
||||
6. **Launch needs nobody:** a site enrolled on its development address and then served on the real domain (or moved
|
||||
to another domain) enrols by itself on its first e-mail. **A non-public copy does not send by itself:** a site
|
||||
with `IAPL_NOINDEX=1` — set it on every staging, preview and test copy — or on a host matched by
|
||||
`mail: { relay: { developmentHosts: ['*.dev.agency.example'] } }`, whose database holds another host's
|
||||
whose host matches `iapl({ developmentHosts })` — default `['*.dev.netscale.pl']`, Intecion's development
|
||||
domain, so the team's development addresses need **no env and no option**; replace the list with the project's
|
||||
own patterns, `[]` empties it — or that has `IAPL_NOINDEX=1`, and whose database holds another host's
|
||||
connection (staging made from production; production's data copied back onto the development address), neither
|
||||
enrols nor sends until an admin presses "Connect again". **A copy with neither mark sends to the real addresses
|
||||
in its data** — the plugin cannot tell it from launch day; the doctor's deep run notes it (`mail-relay-state`,
|
||||
enrols nor sends until an admin presses "Connect again". **A copy on another host without `IAPL_NOINDEX=1` sends to the real
|
||||
addresses in its data** — the plugin cannot tell it from launch day; the doctor's deep run notes it (`mail-relay-state`,
|
||||
info). A production site that kept `IAPL_NOINDEX=1` sends nothing until the variable is removed. For a copy that
|
||||
must never send: `mail: { relay: false }` or SMTP to a catcher. If the project's development addresses share a
|
||||
pattern, set `developmentHosts` in its config. Verify: on the copy, Site integrations → E-mail sending says "The
|
||||
must never send: `mail: { relay: false }` or SMTP to a catcher. If the project's copies live on other hosts than
|
||||
`*.dev.netscale.pl`, name them in `developmentHosts`. The doctor's deep run says which signal applies
|
||||
(`mail-non-public`). Verify: on the copy, Site integrations → E-mail sending says "The
|
||||
data comes from another site (…)" and a test e-mail is refused; on the launched site it says "Connected to IWSN".
|
||||
|
||||
**Verify:** Site integrations → E-mail sending → the block "How e-mails are sent" says "Connected to IWSN"; **Send test e-mail** answers "through IWSN, as <name>"; the mail arrives from
|
||||
@@ -1332,7 +1334,7 @@ overrides per adapter; `resolveRelayOptions` reads what is in effect):
|
||||
| `url` | `RELAY_BASE_URL` | a relay of your own (same contract) |
|
||||
| `host` | host of `serverURL` (`relayHost`, `isPublicHost`) | the public host the service calls back |
|
||||
| `otherHosts` | `'auto'` | a database holding another host's connection: a public site enrols by itself (launch, a move), a non-public one (`IAPL_NOINDEX=1` / `developmentHosts`) neither enrols nor sends until "Connect again"; a list of the site's own other hosts; `'wait'` (a public site without a connection waits too); `'enrol'` (no rule) |
|
||||
| `developmentHosts` | `[]` | host patterns (`*`) of development and staging addresses: a site there is non-public for `otherHosts` (`siteIsNonPublic`) |
|
||||
| `developmentHosts` | `iapl({ developmentHosts })`, default `DEFAULT_DEVELOPMENT_HOSTS` = `['*.dev.netscale.pl']` (`pluginDevelopmentHosts`) | host patterns (`*`) of development and staging addresses, for the mail service alone: a site there is non-public for `otherHosts` with no env (`siteIsNonPublic`, `siteNonPublicSignal` → `NonPublicSignal`, `matchDevelopmentHost`, `isDevelopmentHost`); `[]` = none |
|
||||
| `enrol` | `'auto'` | `'manual'` (only "Connect again" / `enrolRelay`), `false` (token from `token` / `setRelayToken`) |
|
||||
| `accessKeyField` | `false` | `true`: admins get "Enter an access key" in the state block (a hand-issued token) |
|
||||
| `token` | — | a token from elsewhere; nothing is stored, the site does not enrol |
|
||||
|
||||
@@ -102,8 +102,8 @@ through this procedure. Ask only when you are missing something you cannot get y
|
||||
| `relay-refused` / "The mail service could not reach this site at …" (cause `callback-failed`) | `unreachable` / `timeout`: firewall, private network, wrong public host in `serverURL`; `redirect`: `trailingSlash: true`, apex → `www`, a language redirect; `status`: route blocked, missing (`mail: { relay: false }`?) or another `routes.api`; `confirmation`: a proxy rewrites the answer | `curl -i -X POST https://<host>/api/iapl/mail-relay/confirm -d '{}' -H 'content-type: application/json'` must answer **404 with an empty body, no redirect**; fix `serverURL` / `mail.relay.host`, or ask Intecion to set the site's confirm address (path ending in `/confirm/` with trailing slashes); then "Connect again" (the site does not retry by itself for 15 min). email.md "When the site cannot be confirmed" |
|
||||
| `relay-refused`, cause `host-not-allowed` / "This site has no public address yet" | the site runs on `localhost`, a private name, or `serverURL` is empty | expected in development (use SMTP / Mailpit there); in production set `serverURL` |
|
||||
| `relay-refused` on a site whose token was entered by hand ("does not know the server this site now runs on" / "access key … no longer valid") | the site moved or got a second server, or its token expired; a site with a hand-issued token cannot enrol by itself | Intecion adds the server's address, or issues a new token — set it with `setRelayToken(payload, token)` from a script (`pnpm payload run`), or in the panel when the project has `mail.relay.accessKeyField: true` (email.md "The token") |
|
||||
| a site sends nothing: "The data comes from another site (…), so this copy does not send e-mails by itself" / `relay-refused`, cause `client-other-host` | the site says it is not public (`IAPL_NOINDEX=1`, or a host in `mail.relay.developmentHosts`) and its database holds another host's connection: a staging copy of production, or production's data copied back onto the development address. Expected — a copy with production's data must not mail real people by itself | should it send: "Connect again" in the state block, once (until the data is replaced). A copy that must never send: `mail: { relay: false }` or SMTP to a catcher. **The production site itself says this:** `IAPL_NOINDEX` was left set after launch — remove it |
|
||||
| a staging or test copy **does** send, to real addresses | it does not say it is not public, so it looks like a launch (a public site enrols by itself); the doctor's deep run notes "the database also holds the mail-service connection of another host" | `IAPL_NOINDEX=1` on the copy, or `mail: { relay: { developmentHosts: ['*.dev.agency.example'] } }`; to be sure: `mail: { relay: false }` or SMTP to a catcher |
|
||||
| a site sends nothing: "The data comes from another site (…), so this copy does not send e-mails by itself" / `relay-refused`, cause `client-other-host` | the site is non-public — its host matches `developmentHosts` (built in: `*.dev.netscale.pl`) or `IAPL_NOINDEX=1` is set; `iapl-doctor --deep` says which (`mail-non-public`) — and its database holds another host's connection: a staging copy of production, or production's data copied back onto the development address. Expected — a copy with production's data must not mail real people by itself | should it send: "Connect again" in the state block, once (until the data is replaced). A copy that must never send: `mail: { relay: false }` or SMTP to a catcher. **The production site itself says this:** `IAPL_NOINDEX` was left set after launch — remove it; or its host matches a development pattern — take it out of `iapl({ developmentHosts })` |
|
||||
| a staging or test copy **does** send, to real addresses | its host matches no development pattern and it has no `IAPL_NOINDEX=1`, so it looks like a launch (a public site enrols by itself); the doctor's deep run notes "the database also holds the mail-service connection of another host" | name its host in `iapl({ developmentHosts: ['*.dev.netscale.pl', '<the copy's pattern>'] })`, or `IAPL_NOINDEX=1` on the copy; to be sure: `mail: { relay: false }` or SMTP to a catcher |
|
||||
| `relay-pending` / "waiting for approval" | the exception: the service holds new sites for approval when many appear at once, or Intecion approves by hand (a site is normally active as soon as it enrols) | Intecion approves it on the service; nothing to change on the site; the same token then works |
|
||||
| `relay-suspended` | Intecion stopped the site (abuse, a flood from a form) | contact Intecion; fill in SMTP meanwhile |
|
||||
| `relay-disconnected` | an admin pressed "Disconnect" | "Connect again", or SMTP |
|
||||
|
||||
@@ -646,7 +646,7 @@ scaling (5). `●` routes for pages need the database at build time (PROGRAMISTA
|
||||
6. **Notifications**: form messages in every language.
|
||||
7. **Site integrations → E-mail sending**: "Sender name" (the client's name; empty = the site name) and **"Sender
|
||||
address"** (the client's address: with the mail service replies go there). SMTP fields **only** when the client asked
|
||||
for its own server. On the production domain: the block "How e-mails are sent" must say "Connected to IWSN" (a site is active as soon as it enrols; "waiting for approval" is the exception — ask Intecion; the real domain enrols by itself at launch although the site was connected on its development address — nothing to press; "The data comes from another site" = the site says it is not public (`IAPL_NOINDEX=1` or a development host) and holds a copy of another site's data: press "Connect again" only if the copy should send — on the production domain it means `IAPL_NOINDEX` was left set. A staging or test copy must have `IAPL_NOINDEX=1` (or its host in `mail: { relay: { developmentHosts: […] } }`), or it mails the real addresses in its data), then **Send test e-mail** → "through IWSN". Turnstile (for testing site
|
||||
for its own server. On the production domain: the block "How e-mails are sent" must say "Connected to IWSN" (a site is active as soon as it enrols; "waiting for approval" is the exception — ask Intecion; the real domain enrols by itself at launch although the site was connected on its development address — nothing to press; "The data comes from another site" = the site is non-public (its host matches `developmentHosts`, built in `*.dev.netscale.pl`, or `IAPL_NOINDEX=1`) and holds a copy of another site's data: press "Connect again" only if the copy should send — on the production domain it means `IAPL_NOINDEX` was left set. A development address under `*.dev.netscale.pl` needs nothing; a staging or test copy on any other host must have its host in `iapl({ developmentHosts: […] })` or `IAPL_NOINDEX=1`, or it mails the real addresses in its data), then **Send test e-mail** → "through IWSN". Turnstile (for testing site
|
||||
`1x00000000000000000000AA`, secret `1x0000000000000000000000000000000AA`; production keys from the client), analytics/pixel
|
||||
IDs, IndexNow → generate key. Mail/Turnstile errors show up as a dashboard alert.
|
||||
8. **Forms**: check the addresses in the Emails tab of the seeded forms.
|
||||
|
||||
@@ -575,9 +575,10 @@ PROGRAMISTA §6, item 73; email.md; AGENT.md §7.2) — nothing to run; read whi
|
||||
processing agreement names the service. Nothing to arrange with Intecion: the site is active as soon as it enrols.
|
||||
**Launch and a domain move need nothing:** the real domain enrols by itself although the database holds the
|
||||
development address's connection. **A staging or test copy of the database** neither enrols nor sends by itself
|
||||
**if it says it is not public** — `IAPL_NOINDEX=1` (check that every copy has it) or its host in
|
||||
`mail: { relay: { developmentHosts: ['*.dev.agency.example'] } }`: the panel says so until an admin presses
|
||||
"Connect again". A copy with neither mark sends to the real addresses in its data; keep a copy silent for good
|
||||
**when it is non-public**: its host matches `iapl({ developmentHosts })` — built in `*.dev.netscale.pl`, so the
|
||||
team's development addresses need no env and no edit; add the project's other copy hosts to the list — or it
|
||||
has `IAPL_NOINDEX=1`. The panel says so until an admin presses "Connect again"; `iapl-doctor --deep` names the
|
||||
signal (`mail-non-public`). A copy on another host without the variable sends to the real addresses in its data; keep a copy silent for good
|
||||
with `mail: { relay: false }` or SMTP to a catcher. Production must not have `IAPL_NOINDEX` set (it would send
|
||||
nothing).
|
||||
4. Code that compared the result of `payload.sendEmail` needs no change for SMTP and Graph. A send through the mail
|
||||
|
||||
Reference in New Issue
Block a user