Skip to content

Replace Mailhog with Mailpit for local dev email testing #214

Description

@scanner

Summary

Replace Mailhog with Mailpit in the local development Docker Compose stack. Mailhog is unmaintained and does not support TLS/SSL or SMTP authentication — the original reason GH-61 was opened. Mailpit is its actively-maintained successor and supports TLS, SMTP authentication, and everything Mailhog did.

Closes #61.

Current Setup

Location Current value
docker-compose.yml image: druidfi/mailhog:1.0.1 on port 8025
.env EMAIL_HOST=mailhog
settings.py EMAIL_HOST = env("EMAIL_HOST", default="mailhog")
Makefile logs target tails mailhog container

Changes Required

  • docker-compose.yml: replace mailhog service with mailpit (axllent/mailpit); configure TLS and SMTP auth; expose web UI port (default 8025) and SMTP port
  • .env: update EMAIL_HOST=mailhogEMAIL_HOST=mailpit
  • settings.py: update default="mailhog"default="mailpit"
  • Makefile: update logs target to reference mailpit
  • SSL certs: Mailpit can use the existing mkcert-generated certs from ssl/ for its TLS listener
  • SMTP auth: configure Mailpit with credentials matching whatever the dev SMTP settings expect

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions