# Docker

> The engine's image and the compose file with Postgres and Mailpit.

Applies to: the Sypnia engine (open source, self-hosted).  
Source: https://mail.docs.sypnia.com/self-hosting/docker/

For agents: Mail Docker: docker run ports 7600 and 587 with DATABASE_URL, SYPNIA_MAIL_TRANSPORT=smtp, SMTP_URL; compose adds Postgres and Mailpit; with smtp transport only sent and SMTP refusals as events unless return-path mail is routed to inbound.

```bash
docker run -p 7600:7600 -p 587:587 \
  -e DATABASE_URL=postgres://… -e SYPNIA_MAIL_TRANSPORT=smtp -e SMTP_URL=smtps://user:pass@smtp.example.com:465 \
  ghcr.io/sespinosav/sypnia-mail:latest
```

The compose file in the repository adds Postgres and Mailpit. With the `smtp` transport there are no delivery events beyond `sent` and SMTP refusals; bounces that arrive later reach you only if you route the return path's mail to the engine's inbound.
