Skip to content

ionghitun/mailpit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mailpit Docker Stack

This project provides a Docker Compose setup for running Mailpit with optional HTTPS support via nginx and nginx-proxy.

Prerequisites

  • Docker Engine & Docker Compose
  • Git
  • Linux or Windows WSL2
  • A working nginx-proxy network (see nginx-proxy setup)

Installation

  1. Clone the repository
    git clone https://github.com/ionghitun/mailpit.git
    cd mailpit
  2. Copy and configure environment variables
    cp scripts/.env.example scripts/.env
    # Edit other variables in scripts/.env as needed
  3. Update virtual host configuration
    • Modify scripts/nginx/custom.conf to match your DOMAIN_HOST.
  4. Start the project
    sh scripts/start.sh
  5. Access Mailpit

Available scripts

./scripts/start.sh    # Start the containers
./scripts/down.sh     # Stop the containers
./scripts/build.sh    # Build or rebuild the containers
./scripts/restart.sh  # Restart the containers

Connecting to Mailpit

Use the following configuration to connect an app to Mailpit SMTP:

  • SMTP Host: localhost (or host.docker.internal if connecting from another container)
  • SMTP Port: MAILPIT_PORT
  • Username: (leave empty)
  • Password: (leave empty)
  • Encryption: None

Troubleshooting

  • Docker Issues: For older versions you might want to remove COMPOSE_BAKE from .env.
  • Docker Compose Issues: Please update and ensure you can use docker compose, not old version docker-compose

License

This project is licensed under the MIT License. See LICENSE for details.

Contributing

Contributions are welcome! Please open issues or submit pull requests following the repository guidelines.

Happy Coding

About

Mailpit with docker compose and nginx

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages