Conversation
Signed-off-by: Toomore Chiang <toomore0929@gmail.com>
Signed-off-by: Toomore Chiang <toomore0929@gmail.com>
Signed-off-by: Toomore Chiang <toomore0929@gmail.com>
Signed-off-by: Toomore Chiang <toomore0929@gmail.com>
Signed-off-by: Toomore Chiang <toomore0929@gmail.com>
Signed-off-by: Toomore Chiang <toomore0929@gmail.com>
Signed-off-by: Toomore Chiang <toomore0929@gmail.com>
Signed-off-by: Toomore Chiang <toomore0929@gmail.com>
Phase 1 - DB connection management: - Make GetConn() singleton with sync.Once - Lower MaxOpenConns from 1024 to 50, add MaxIdleConns(10) - Remove conn.Close() from mails.filteratags (was closing shared pool) Phase 2 - SQL security and concurrency: - Parameterize send uid query, validate with strconv.Atoi - Use Exec with placeholders in campaign.Create - Add serverlinksCacheMu RWMutex for serverlinksCache Phase 3 - Error handling: - FormatEmail: guard against invalid email (no @) to prevent panic - GetSeed: check rows != nil before defer rows.Close() Also: remove unused fmt import from cmd/send.go, add TestFormatEmailInvalid for edge case coverage Co-authored-by: Cursor <cursoragent@cursor.com>
… lock - Add rows.Close() after links query in door() to prevent connection leak - Add defer userrows.Close() in washi() for user query - Apply double-check locking for serverlinksCache to reduce DB thundering herd when multiple goroutines request same missing cache key Co-authored-by: Cursor <cursoragent@cursor.com>
- Add defer rows.Close() in updateUser to fix connection leak per iteration - Add rows.Close() in filteratags fallback SELECT to fix goroutine leak - Add rows != nil check before defer in send for defensive safety - Add getDSN() to support MAILBOX_DB_DSN env for configurable DSN Co-authored-by: Cursor <cursoragent@cursor.com>
- Add bilingual sections (中文/English) for overview, quick start, install - Include full env vars table with MAILBOX_DB_DSN - Document complete CLI commands (campaign, user, send, server) - Add template tags and Nginx config tables - Remove deprecated Travis/Coveralls badges Co-authored-by: Cursor <cursoragent@cursor.com>
- Change gendoc output from ./ to ./cmd/docs for predictable output - Regenerate all cobra docs (mailbox doc) with current command tree - Fix cmd/README.md: mailbox sender -> mailbox send Co-authored-by: Cursor <cursoragent@cursor.com>
- security: add match nil check in server.go door() to prevent panic - ci: upgrade actions/checkout to v4, add go vet, use coverage in workflow - goclean: simplify to vet + test + cover report (no merge logic) - reader: add error handling in Save(), use Exec instead of Query - reader: add reader_test.go smoke test - build: ignore cmd/docs/mailbox_completion*.md, remove from tracking Co-authored-by: Cursor <cursoragent@cursor.com>
- go.mod: go 1.25, toolchain go1.25.7 - CI: go-version '1.25' in go.yml - Docker: golang:1.25-alpine3.22 (Dockerfile, build-base, dev-run-docker) - deps: aws-sdk-go v1.55.8, mysql v1.9.3, cobra v1.10.2, viper v1.21.0 Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Phase 1 of unsubscribe mechanism: enable mail clients to show built-in unsubscribe button via List-Unsubscribe mailto header, and provide CLI tools for manual recipient opt-out. - Switch SES from SendEmail to SendRawEmail to support custom headers - Add List-Unsubscribe / List-Unsubscribe-Post headers (env-driven) - Add `user unsubscribe` command for single/batch marking (alive=0) - Add `user unsubscribed` command to list opted-out recipients - Update README with new env vars and Phase 1 workflow docs Made-with: Cursor
- filippo.io/edwards25519 v1.1.0 → v1.2.0 - pelletier/go-toml/v2 v2.2.4 → v2.3.0 - golang.org/x/sys v0.40.0 → v0.42.0 - golang.org/x/text v0.33.0 → v0.35.0 Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New features: