Add notify-creds subcommand to (re)email members git + mailbox creds

`agentbbs notify-creds` backfills credential emails to verified members
who signed up before the git/mailbox welcome emails existed.

- git (all verified): forgejo.EnsureUserReset resets each account to a
  fresh one-time password (must-change) and emails the web login link,
  username, and password. New method since the original one-time
  password is not recoverable for existing accounts.
- mailbox (all verified): ensures the forwardemail alias and emails the
  address + webmail link.
- Preview by default; --send executes. --git/--mail/--user filters.
  Refuses --send without SMTP; warns+skips when Forgejo/forwardemail
  are unconfigured.

Also folds in the welcome-email functions (gitWelcomeEmailBody,
mailWelcomeEmailBody, EnsureUser password return, provisionGit/
ensurePremium sends) that this builds on. README ops + forgejo tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-06-23 10:16:28 +00:00
parent 6dc94bd784
commit c967da9f50
5 changed files with 373 additions and 18 deletions

View file

@ -74,6 +74,15 @@ Ops:
```bash
./agentbbs grant-pod alice 12 # manual pod grant (12 months)
# (re)email verified members their git + mailbox creds/links — preview first,
# then --send. Git: resets each Forgejo account to a fresh one-time password and
# emails the web login link; mailbox: ensures the @mail alias and emails the
# address + webmail link. Needs AGENTBBS_SMTP_*, _FORGEJO_*, _FORWARDEMAIL_* set.
./agentbbs notify-creds # preview, all verified members
./agentbbs notify-creds --send # really send git + mailbox to everyone
./agentbbs notify-creds --git --send # git creds only
./agentbbs notify-creds --user alice --mail --send
```
## Deploy