New-app rehearsal: mail refusals, Junk in inbox, Reply-To

coreapp mail lists mail the Core's mail server refused for sending too
fast (2 messages a minute per app; the refusal has no queue id, so it was
missing). coreapp inbox reads the test account's Junk folder too, marked
as such, and shows Reply-To. New apps ignore __pycache__.

Skill: the mail limit (queue, send again on a 4xx), Date and Message-ID,
a regular member role where taking part is the point, testing what takes
two people, the only readable mailbox, what coreapp new makes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-04 13:45:11 -07:00
co-authored by Claude Opus 5.5
parent b855fd53f4
commit 491af8745f
6 changed files with 108 additions and 15 deletions
+34 -5
View File
@@ -248,7 +248,9 @@ Two rules for who may do what, on every Core:
Core account may sign in, without an invitation, as a read-only member
(a viewer). The app's admins raise people from there. In an app where
each person has only their own private things (a feed reader, notes),
a regular user is the lowest role.
or where taking part is the point and each person changes only their
own things (listing what they lend, posting on a board), a regular
member is the lowest role; say so in your report.
**Before writing sign-in code, read
[references/sign-in.md](references/sign-in.md):** how to find what the app
@@ -276,6 +278,17 @@ if people should be able to answer. The account can't sign in to anything
else on the Core. `coreapp new --email` adds the need (there's no example
app for it).
The Core's mail server takes **2 messages a minute** from an app and
refuses the rest for now (`450 4.7.1 too much mail`). So don't send mail
inside the request that causes it; queue it (in the database, so a restart
doesn't lose it) and send from a background worker that sends a refused
message again later (after a minute, then longer). An app's own SMTP
settings usually do this already; check, and say in your report if it
drops mail on a 4xx. Notifications to many people (a newsletter) go out
slowly: 120 an hour. Give each message a `Date` and a `Message-ID` (most
mail libraries add them; Python's `smtplib` doesn't): without them the
Core's spam filter files it as junk.
To test the app's mail, send to the Core's test account,
`coreapp.test@<domain>`, which has a mailbox: trigger the mail the app's
usual way (a password reset, an invitation or a notification for that
@@ -285,8 +298,14 @@ HTML as text with each link's address), so you can check it and follow
its link. `coreapp inbox --clear` empties it before a test. If nothing
arrives, `coreapp mail` shows what the Core's mail server did with each
message from the app's account in the last day (accepted, then delivered,
deferred or bounced, with the reason). Mail to other addresses leaves
the Core; ask the user to confirm delivery to a real one.
deferred or bounced, with the reason; or refused for sending too fast).
`coreapp inbox` shows `From`, `Reply-To`, `To` and `Subject`, and lists
mail the spam filter put in the Junk folder too, marked as such: fix
what made it look like spam.
The test account's is the only mailbox you can read: to see mail meant
for a second person, give that person the test account's address. Mail
to other addresses leaves the Core; ask the user to confirm delivery to a
real one.
### Not available yet
@@ -330,8 +349,11 @@ coreapp new --sso my-app # with sign-in (Python example)
coreapp new --postgres --sso my-app # both
```
It makes `./my-app` with a working example, `coreapp.toml` and a README.
Replace the example with the real app.
It makes `./my-app` with a working example, `coreapp.toml`, a README and
`.gitea/workflows/publish.yml` (publishes on a tag; see
references/publishing.md). Replace the example with the real app, and the
README's description of the example with the app's. `--email` and
`--mysql` only add the need; the app's mail and MySQL code are yours.
### 2b. An existing app (porting)
@@ -374,6 +396,13 @@ got back to the app signed in; see
isn't the admin: ask the user to sign in once in a browser as
`admin@<domain>` before a release.
There's one test account. To test what takes two people (one asks,
another answers) or the admin's pages, make the other sessions inside the
container with the app's own code (`coreapp shell`: create the person's
row and a signed session the way the app's sign-in does, using the same
secret), then use their cookies with curl. Say in your report which
parts were tested that way rather than through a real sign-in.
### 4. When something fails
| Command | Shows |