4.5 KiB
Infrastructure design - U1 mail-foundation
Configuration keys (per environment, on the host)
| Key | Where | Example / note |
|---|---|---|
Email__Smtp__Host |
shared/env |
mail.slpsoftware.nl (the SMTP host SimpleDeckApp uses in production, per Bryan). Setting it switches mail ON. |
Email__Smtp__Port |
shared/env |
587 |
Email__Smtp__EnableSsl |
shared/env |
true (STARTTLS) |
Email__Smtp__Username, Email__Smtp__Password |
shared/env (mode 600) |
secrets, never committed, never in messages or logs |
App__PublicBaseUrl |
shared/env |
https://test.andreaslop.nl (https, no path) |
App__DefaultLanguage |
optional | nl (default) or en |
Email__FromAddress, Email__FromName |
committed default or env | no-reply@slpsoftware.nl / site name (SimpleDeckApp's committed default) |
Email__AllowedFromAddresses__0..n |
env | extra sender addresses a site may choose in its settings; empty = only FromAddress |
Email__LogoUrl, Email__BrandColor |
committed (ASF) or env | /admin/brand-logo-on-light.png, #5f6a58 |
Start-up validation refuses a broken mail configuration (when a host is set) with a message that never contains the credentials. Without a host nothing changes.
Local development
smtp4dev (already installed) on localhost:25: Email__Smtp__Host=localhost, Email__Smtp__Port=25, Email__Smtp__EnableSsl=false, no username, App__PublicBaseUrl=http://localhost:5200 (http is accepted for loopback only).
ASF test host (Operations will do it, needs Bryan's go for the real test mail)
- Add the keys above to
shared/envofandreaslopfotografie-test(mode 600 stays), restart the unit. Email__FromAddressstaysno-reply@slpsoftware.nl(the SMTP service's own domain). A sender on@andreaslop.nlonly after the check below.- One real test mail to an address of Bryan before approval.
Sender-domain alignment (production checklist item)
From: domain, SPF and DKIM must agree with the SMTP service that actually sends:
- SPF of the
From:domain must authorise the sending service (today bothslpsoftware.nlandandreaslop.nlpublishv=spf1 a mx include:smtp.spf.ziggo.nl ~all). - That service must DKIM-sign for the
From:domain (adkim._domainkeyrecord exists for both domains; whether the service signs with it is not visible from outside). mail.slpsoftware.nlwill deliver@andreaslop.nlmail properly only if it may send/sign for that domain. DMARC isp=nonetoday (monitoring only).- Therefore the sender list is an allowlist: add an
@andreaslop.nladdress toEmail__AllowedFromAddressesonly after this is confirmed.
No other infrastructure
No new service, port, queue or storage. One additive table (SiteSettings) in the existing database.
Per-host SMTP server (update 2026-11-08, from Bryan via "CMS & API")
The SMTP settings are per host (all in that host's shared/env), so each site can use its own mail server:
| Site | SMTP host | Sender domain | Status |
|---|---|---|---|
| SlpSoftware | mail.slpsoftware.nl (the host SimpleDeckApp uses) |
@slpsoftware.nl |
as before |
| ASF (test, later production) | probably mail.andreaslop.nl (not mail.slpsoftware.nl) |
@andreaslop.nl |
to be confirmed |
Read-only checks done from the developer PC (by "CMS & API"): mail.andreaslop.nl and andreaslop.nl both resolve to 217.121.250.215; the MX of andreaslop.nl is mail.andreaslop.nl (preference 10); TCP 587 is reachable. This fits the published SPF (a mx): a mail sent by that server for @andreaslop.nl is SPF-aligned, which the earlier plan (mail.slpsoftware.nl for ASF) would not have been.
Open points (Operations plan, no code needed):
- Which mailbox/account on
mail.andreaslop.nlis used, and whether it may send withno-reply@andreaslop.nl(or another address) asFrom. Then ASF setsEmail__FromAddressandEmail__AllowedFromAddresses__naccordingly (the committed ASF defaultno-reply@slpsoftware.nlis only a placeholder until then). SlpSoftware keepsmail.slpsoftware.nl. - Port and TLS: not yet confirmed that the server offers STARTTLS on 587 (
Email__Smtp__EnableSsl=true); if it needs implicit TLS (465) or none, the sender must be adapted (it supports STARTTLS or plain today) and a plain connection would not be acceptable beyond a private network. - DKIM: a
dkim._domainkey.andreaslop.nlrecord exists; confirm the server signs with that key. DMARC isp=none(monitoring only). - Credentials for that account go into the ASF test unit's
shared/envby whoever manages the host (not by this feature's code or by chat).