Repository navigation
docs: document SMTP_* and other undocumented env vars - #1083
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
recheck |
|
Thanks, this reads well and the defaults match the code. One thing for the CLA: "recheck" only re-runs the bot, it doesn't sign. Please post a comment with exactly this sentence: I have read the CLA Document and I hereby sign the CLA About the two things you left out. The compose one is actually a bug: |
|
Quick heads-up: the compose part you spotted is fixed on main now (#1084), so |
Coding-Professional
left a comment
There was a problem hiding this comment.
Cross-checked the added SMTP defaults and fallback precedence against EmailService, and checked the new knowledge-graph, shutdown and MCP tracing defaults against their readers. One small copy/paste issue below: I reproduced the shell syntax error with Bash -n and verified that quoting the value passes. No SMTP delivery test was run.
| # SMTP_SECURE=false | ||
| # SMTP_USER= | ||
| # SMTP_PASS= | ||
| # SMTP_FROM=AnythingMCP <noreply@example.com> |
There was a problem hiding this comment.
Could the sender example quote its value, e.g. # SMTP_FROM="AnythingMCP <noreply@example.com>"? Uncommenting the current example produces SMTP_FROM=AnythingMCP <noreply@example.com>, which fails bash -n with a syntax error because the angle brackets are interpreted as redirection. This matters for the local-development path that sources .env before running Prisma. The commented template itself sources successfully, so the validation in the description would not catch this. The quoted form passes the same syntax check and preserves the intended display name.
There was a problem hiding this comment.
good catch, quoted it so it sources cleanly now 👍
|
@notlakshitha thanks for the SMTP_FROM quoting fix, good catch. The only thing still missing is the CLA: please post a comment with exactly this sentence and the check goes green, then I'll merge. I have read the CLA Document and I hereby sign the CLA |
|
I have read the CLA Document and I hereby sign the CLA |
|
@notlakshitha thanks, and sorry for the extra round. Your comment didn't register with the CLA bot: it only matches when the comment is exactly that sentence, and yours had a couple of blank lines after it. Editing it won't help, so please post a new comment with only this line, nothing before or after: I have read the CLA Document and I hereby sign the CLA Once the check is green I'll update the branch and merge. |
|
I have read the CLA Document and I hereby sign the CLA |
helpcodeai
left a comment
There was a problem hiding this comment.
Thanks @notlakshitha, CLA is green now. Merging.
Summary
.env.examplesays the cloud host jobs "mail through the SMTP_* settings above", but it defines noSMTP_*variables. The backend reads seven of them, anddocs/deployment.mdlists only four. Several other variables the backend reads (KG_HASH_SECRET,KG_MCP_TOOL,KG_OBSERVE_COOLDOWN_SEC,SHUTDOWN_TIMEOUT_MS,SENTRY_MCP_TRACES_SAMPLE_RATE) are not documented anywhere. This PR documents them as agreed in #1049.Changes
.env.example: add a commented Email (SMTP) block with all sevenSMTP_*variables, placed above the cloud host jobs section that refers to it..env.example: add commented entries forKG_HASH_SECRET(noting it should be set explicitly in production rather than relying on theENCRYPTION_KEY→JWT_SECRET→ built-in fallback chain),KG_MCP_TOOL,KG_OBSERVE_COOLDOWN_SEC,SHUTDOWN_TIMEOUT_MSandSENTRY_MCP_TRACES_SAMPLE_RATE.docs/deployment.md: add the sevenSMTP_*variables to the Environment Variables table.Names, defaults and behaviour were checked against the code that reads each variable:
settings/email.service.ts,knowledge-graph/identifier.ts,mcp-server/mcp-endpoint.controller.ts,knowledge-graph/kg.service.ts,main.tsandinstrument.ts.Type
Testing
.env.exampleline is commented out)From the repository root:
git diff --check: no whitespace errors.set -a; . ./.env.example: sources without errors.Checklist
Related Issues
Closes #1049
Two related things I noticed but left out of scope: the default
docker-compose.ymldoes not pass theSMTP_*,KG_*,SHUTDOWN_TIMEOUT_MSor Sentry variables into the app container, andSMTP_FROM_NAMEis written bysetup.shandrailway.jsonbut not read by the backend. I'm happy to follow up on either if useful.