Skip to content

mailserver: persist the mail-ingest login password - #30

Merged
tcoretech merged 1 commit into
hardening/2026-09-26from
fix/mail-ingest-password-persist
Nov 19, 2026
Merged

tcoretech merged 1 commit into
hardening/2026-09-26from
fix/mail-ingest-password-persist

Conversation

@tcoretech

Copy link
Copy Markdown
Owner

Follow-up to #29. generate_secrets only fills an in-memory map, and mailserver's secrets.sh never wrote it back. So MAIL_INGEST_SMTP_PASSWORD would never reach .env, and mail-ingest's compose would stop on its :? guard. The existing mail passwords live in .env.global, which only corekit init writes.

This writes the key to the service .env when it's missing, using update_env_var, and lists it in .env.example.

Tested on a disposable copy of the service directory: it writes a 32-character alphanumeric value once, a second run leaves the file unchanged, and other keys are untouched.

generate_secrets only fills an in-memory map; mailserver's secrets.sh never
wrote it back, so MAIL_INGEST_SMTP_PASSWORD would be regenerated and lost
on every run and mail-ingest's compose would refuse to start. The existing
mail passwords live in .env.global, which only `corekit init` writes.

Write the key to the service .env when it is missing, and list it in
.env.example.
@tcoretech
tcoretech merged commit 3426b5a into hardening/2026-09-26 Nov 19, 2026
@tcoretech
tcoretech deleted the fix/mail-ingest-password-persist branch November 19, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant