> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendpost.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom SMTP Integration

> Connect your own SMTP server (Postfix or any standards-compliant MTA) to SendPost for unified analytics, routing, and throttling.

SendPost's Custom SMTP integration allows you to use your **own SMTP server** as a **Third-Party Sending Provider (TPSP)**. This means you can:

* Relay emails through your existing Postfix or other SMTP infrastructure
* Receive full event visibility in SendPost (processed, sent, delivered, bounces, opens, clicks, unsubscribes)
* Apply SendPost's per-provider throttling (27 ISP categories), IP pool routing, and retry logic
* View all email analytics in one centralized dashboard alongside other providers

No DNS changes are required. Your existing verified domain and bounce handling (`sp-bounce.{domain}`) are reused. SendPost prepares each message (DKIM, tracking pixel, click rewrites, headers) and relays it over SMTP to your server. Delivery events are captured via synchronous SMTP responses, SendPost tracking, the existing bounce processor, and an optional event reporting agent you install on your MTA.

***

## Why Use Custom SMTP with SendPost?

| Feature             | Your SMTP Alone | Custom SMTP + SendPost                              |
| ------------------- | --------------- | --------------------------------------------------- |
| Unified dashboard   | ❌               | ✅ All events in one place                           |
| Per-ISP throttling  | Manual          | ✅ Gmail, Yahoo, etc. (27 categories)                |
| IP pool routing     | ❌               | ✅ Route % traffic through your MTA                  |
| Retry & failover    | Custom          | ✅ Built-in retry logic, fallback to other providers |
| Open/click tracking | Custom          | ✅ SendPost tracking endpoints                       |
| Bounce processing   | Custom          | ✅ Reuses SendPost bounce infrastructure             |
| Gradual migration   | ❌               | ✅ Compare your MTA vs SendPost IPs side by side     |

***

## What's Covered in This Guide

<CardGroup cols={2}>
  <Card title="Setting Up" icon="gear" href="/guides/custom-smtp/setup">
    Create a Custom SMTP TPSP, verify connectivity, and install the event reporting agent
  </Card>

  <Card title="Sending Emails" icon="paper-plane" href="/guides/custom-smtp/sending-emails">
    Send emails through your SMTP server using the SendPost API with IP Pool routing
  </Card>

  <Card title="Event Reporting Agent" icon="server" href="/guides/custom-smtp/event-agent">
    Install and configure the agent to report delivered, bounced, and deferred events from your MTA logs
  </Card>

  <Card title="Event Types" icon="bell" href="/guides/custom-smtp/event-types">
    Understand CS event types and how they map to the sending lifecycle
  </Card>

  <Card title="Analytics" icon="chart-line" href="/guides/custom-smtp/analytics">
    Track opens, clicks, bounces, and configure rate limiting
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/guides/custom-smtp/troubleshooting">
    Common issues, FAQs, and getting help
  </Card>
</CardGroup>

***

## Quick Reference

### Key Endpoints

| Purpose                 | URL                                                              |
| ----------------------- | ---------------------------------------------------------------- |
| Send Email              | `POST /api/v1/subaccount/email/`                                 |
| Event Ingestion (agent) | `POST https://events.sendpost.io/api/v1/tpsp/custom-smtp/events` |
| View Events             | SendPost Dashboard → Events                                      |

### Setup Checklist

<Steps>
  <Step title="Create Custom SMTP TPSP">
    In SendPost: Providers → NEW → Custom SMTP. Enter host, port, security, auth, and max rate.
  </Step>

  <Step title="Copy Event Ingestion API Key">
    Save the API key shown once after creation; it authenticates the event reporting agent.
  </Step>

  <Step title="Install Event Reporting Agent">
    Run the one-liner install on your MTA server (Postfix supported initially).
  </Step>

  <Step title="Configure IP Pool">
    Create an IP Pool in SendPost that routes traffic to your Custom SMTP TPSP.
  </Step>

  <Step title="Whitelist Domain">
    Use the same verified sending domain in SendPost that your MTA uses.
  </Step>

  <Step title="Send Test">
    Use the "Send Test" button in the UI or API with the IP pool to confirm the full pipeline.
  </Step>
</Steps>
