---
title: SMTP
icon: smtp
description: Set up and run the Reloop outbound SMTP engine locally in Docker.
---
> For the complete documentation index, see [llms-docs.txt](/llms-docs.txt) or the site index [llms.txt](/llms.txt). Full docs corpus: [llms-full-docs.txt](/llms-full-docs.txt). Prefer markdown URLs (append `.md`) for agent consumption. Product skill: [skill.md](/skill.md).


Outbound KumoMTA engine — accepts mail from [mail](/docs/setup/backend/mail) and delivers via SMTP (Mailpit locally).

<Tip>
Run [`bun setup`](/docs/setup) or `bun docker:up` from the monorepo root. SMTP needs free ports `465` / `587`.
</Tip>


## Overview

| Property | Value |
| :--- | :--- |
| **Directory** | `apps/backend/smtp` |
| **Docker service** | `smtp` (container `reloop-smtp`) |
| **SMTP ports** | `465`, `587`, `2025`, `2465`, `2587` |
| **HTTP port** | `8020` |
| **Stack** | KumoMTA · Lua |


## Quick start

```bash
bun docker:up
```

View captured mail at [http://localhost:8025](http://localhost:8025) (Mailpit).


## Configuration

Key variables in `local/docker-compose.yml`:

| Variable | Default |
| :--- | :--- |
| `BASE_URL` | `https://local.reloop.sh` |
| `NATS_URL` | `reloop-nats:4222` |


## Commands

| Command | Description |
| :--- | :--- |
| `bun docker:up` | Start full Docker stack (includes SMTP) |
| `docker compose -f local/docker-compose.yml up -d smtp` | Start SMTP only |
| `docker logs -f reloop-smtp` | Stream logs |
| `docker compose -f local/docker-compose.yml stop smtp` | Stop container |


## Architecture

| Layer | Detail |
| :--- | :--- |
| **Submission** | Accepts outbound mail on ports `465` / `587` / `2025` / `2465` / `2587` |
| **Policies** | Lua scripts in `apps/backend/smtp/policy/` handle routing and DKIM |
| **Local delivery** | Captured by Mailpit at [http://localhost:8025](http://localhost:8025) |
| **Inbound** | Port `25` MX is handled by [inbound](/docs/setup/backend/inbound), not this service |


## Next

<CardGroup cols={2}>
  <Card icon="rocket" title="Setup" href="/setup">
    One-command local bootstrap
  </Card>
  <Card icon="globe" title="Port reference" href="/setup/port">
    Edge ports and conflicts
  </Card>
  <Card icon="mail-single" title="Mail" href="/setup/backend/mail">
    HTTP send API that hands off here
  </Card>
  <Card icon="mail-receive" title="Inbound" href="/setup/backend/inbound">
    MX receiver on port `25`
  </Card>
</CardGroup>
