Files
wehub-resource-sync 4b6817381b
Benchmark image — build + push to ECR (any adapter) / build + push (push) Waiting to run
CI / quality (ubuntu-latest) (push) Waiting to run
CI / test (tools-runtime) (push) Waiting to run
CI / test (e2e-general) (push) Waiting to run
CI / test (cli-runtime) (push) Waiting to run
CI / test (e2e-provider-and-openclaw) (push) Waiting to run
CI / test (integrations-and-misc) (push) Waiting to run
CI / coverage-report (push) Blocked by required conditions
CI / test-kubernetes (push) Waiting to run
CI / should-run-thorough (push) Waiting to run
CI / test-thorough (cloudwatch-demo) (push) Blocked by required conditions
CI / test-thorough (flink-ecs) (push) Blocked by required conditions
CI / test-thorough (upstream-lambda) (push) Blocked by required conditions
CI / test-thorough (prefect-ecs-fargate) (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Release / build-binaries (zip, opensre.exe, onefile, windows-latest, windows-x64) (push) Blocked by required conditions
Release / publish-release (push) Blocked by required conditions
Release / publish-main-release (push) Blocked by required conditions
Release / prepare (push) Waiting to run
Release / verify (push) Blocked by required conditions
Release / build-python-dist (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, macos-15-intel, darwin-x64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, macos-latest, darwin-arm64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04, linux-x64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04-arm, linux-arm64) (push) Blocked by required conditions
Synthetic Deterministic Tests / Synthetic offline (deterministic) (push) Waiting to run
Interactive Shell Live (PR + post-merge) / turn-checks (no-LLM) (push) Waiting to run
Interactive Shell Live (PR + post-merge) / turn-live shard ${{ matrix.shard_index }} (push) Waiting to run
CI (OpenClaw E2E) / openclaw test (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:10:45 +08:00

132 lines
2.6 KiB
Plaintext

---
title: "SMTP"
description: "Configure SMTP email delivery for background RCA completion notifications."
---
OpenSRE can send **background RCA completion emails** through any existing
SMTP relay you already use. You do **not** need to run your own mail server.
Typical providers:
- Google Workspace / Gmail SMTP
- Microsoft 365 SMTP
- AWS SES SMTP
- SendGrid / Postmark / Mailgun SMTP
- local dev SMTP sinks like Mailpit or MailHog
---
## What this powers
In v1, the `smtp` integration is used for:
- `/background` RCA completion notifications
The email summary includes:
- **Root cause**
- **Top analysis**
- **What to do next**
- a small internal stats block
---
## Step 1: Configure the integration
### Via CLI wizard
```bash
opensre integrations setup smtp
```
You'll be prompted for:
- SMTP host
- SMTP port
- security mode: `starttls`, `ssl`, or `none`
- optional username/password
- sender address
- optional default recipient
### Via environment variables
```bash
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_SECURITY=starttls
SMTP_USERNAME=mailer
SMTP_PASSWORD=secret
SMTP_FROM_ADDRESS=opensre@example.com
SMTP_DEFAULT_TO=team@example.com
```
If authentication is required, set **both** `SMTP_USERNAME` and
`SMTP_PASSWORD`.
---
## Step 2: Verify
```bash
opensre integrations verify smtp
```
A passing verification confirms OpenSRE can:
- connect to the SMTP server
- negotiate TLS when configured
- authenticate when credentials are provided
Sample success output:
```text
smtp: passed — Connected to SMTP server successfully.
```
---
## Step 3: Use it with background investigations
Enable background mode in the interactive shell:
```text
/background on
```
Then start an investigation as usual. When it completes, OpenSRE sends the
RCA summary email to the configured default recipient.
You can inspect the completed job in the shell with:
```text
/background list
/background show <task_id>
```
---
## Troubleshooting
| Detail | Likely cause |
| --- | --- |
| `Missing recipient email address` | No `SMTP_DEFAULT_TO` is configured yet. |
| `username and password must both be set` | Only one auth field was provided. |
| `from_address must look like an email address` | Sender address is malformed. |
| `SMTP connection failed` | Host/port/TLS settings are wrong, or the relay is unreachable. |
For local testing, Mailpit is a good fake SMTP target:
```bash
docker run -p 1025:1025 -p 8025:8025 axllent/mailpit
```
Then configure:
```bash
SMTP_HOST=localhost
SMTP_PORT=1025
SMTP_SECURITY=none
SMTP_FROM_ADDRESS=opensre@example.com
SMTP_DEFAULT_TO=team@example.com
```