Тип сервиса
Сервис Mailpit
Сервис тестирования почты для перехвата, просмотра и отладки исходящих писем в окружениях разработки и staging.
Вы добавляете этот сервис в стек и выбираете там его версию и ресурсы. Каждое окружение может их переопределить.
В StackMaster
Как Mailpit работает в StackMaster
How applications reach it
- SMTP: host is the name of this app service inside the environment, port
1025. No TLS, no username and no password; no token is generated. - The service carries the
smtpdlabel, so it satisfies the mail link of application services. A linked PHP service, for example, receives the host and port asMSMTP_HOSTandMSMTP_PORTand PHP'smail()then ends up here; other runtimes receive variables named by their own service, such asSMTP_HOSTandSMTP_PORT. Read those variables; do not hardcode the host. - An application that requires SMTP authentication or TLS for its mail transport fails against this service: configure the transport without them.
Web interface and API
Port 8025 serves the web interface and Mailpit's REST API (/api/v1/...). Messages are read, searched and deleted there.
The captured mail includes password reset links and other secrets, so Wodby protects Mailpit's public domains with basic auth by default: each Mailpit app service gets its own generated password, which members reveal on the environment's Endpoints > Auths page. Services inside the environment reach port 8025 directly, without the password. A request from outside the environment to the REST API sends the same username and password.
What to expect
- Every message sent to it is captured, whatever the recipient address. Nothing leaves the environment, so mail from an environment that uses Mailpit never reaches real mailboxes. For real delivery the environment needs a relay service such as OpenSMTPD instead.
- Mailpit keeps a limited number of messages and deletes the oldest ones first.
- The manifest sets no Mailpit options. Options are environment variables on this service in Mailpit's
MP_*form.
Data
The optional data volume is mounted at /data. Mailpit stores messages in a temporary file that is removed on exit unless its database option points at a file, so captured mail survives a restart only when MP_DATABASE is set to a path under /data and the volume exists. The manifest declares no backups, imports or actions.
Check the result
- Send a test message from the application, then open the web interface, or request
GET http://<app service name>:8025/api/v1/messagesfrom a service in the environment.
Обзор
Технический профиль Mailpit
Версии
Репозиторий исходного кода
Публичный Helm-чарт
Постоянные тома
Стеки
Стеки, в которые входит Mailpit
Конфигурация
Конфигурация сервиса Mailpit
Технические домены
Тома