Prerequisites
Before setting up the Custom SMTP integration, ensure you have:1. SMTP Server
- A running SMTP server (Postfix or any standards-compliant MTA)
- Hostname or IP and port (e.g., 25, 465, 587, 2525)
- Connection security: None, STARTTLS, or TLS
- Authentication (if required): PLAIN or LOGIN; username and password
OAuth or token-based SMTP auth is not supported. Only PLAIN/LOGIN and unauthenticated connections are supported.
2. SendPost Account
- A SendPost account with admin access
- At least one sub-account created
- Your sending domain verified in SendPost (same domain your MTA uses)
3. Bounce Domain (Already Configured)
Your verified domain should already have bounce handling:sp-bounce.{domain} CNAME’d to sp.sendpost.info. Custom SMTP reuses this; no additional DNS changes are required.
Setting Up Custom SMTP Integration
Step 1: Create Custom SMTP TPSP
- Log in to your SendPost Dashboard
- Go to Settings → Providers
- Click NEW and select Custom SMTP as the provider type
Step 2: Configure SMTP Settings
Fill in the form:| Field | Description |
|---|---|
| Name | A human-readable label (e.g., “Postfix Cluster US-East”) |
| SMTP Host | Hostname or IP of your SMTP server (e.g., smtp.customer.com) |
| SMTP Port | Default 587; options include 25, 465, 587, 2525 |
| Connection Security | None / STARTTLS / TLS |
| Authentication | None / PLAIN / LOGIN |
| Username | SMTP username (if auth is enabled) |
| Password | SMTP password (if auth is enabled) |
| Max Rate Per Hour | Global rate limit for this TPSP (default 60) |
Step 3: Test Connection (Required)
Before you can create the TPSP, you must click Test Connection. This runs a full SMTP connectivity test using the details you entered:TCP dial → EHLO → STARTTLS (if configured) → AUTH (if configured) → MAIL FROM → RCPT TO → DATA (minimal test message) → QUIT
- If the test passes: The Submit button is enabled. Click Submit to create the Custom SMTP TPSP. SendPost then creates the record, initializes per-provider hubs and consumers, and generates the Event Ingestion API Key.
- If the test fails: A descriptive error is shown (e.g., connection refused, TLS handshake failed, auth rejected, MAIL FROM/RCPT TO/DATA failure, timeout). Fix your server or firewall, then run Test Connection again. Submit remains disabled until the test passes.
Step 4: Install Event Reporting Agent
To get delivered, bounced, and deferred events from your MTA (in addition to synchronous sent and SendPost tracking), install the event reporting agent on the server where your MTA runs. The UI shows a one-liner install command. For Postfix:<EVENT_INGESTION_KEY> with the key from Step 3. The agent tails the Postfix mail log, parses delivery/bounce/defer entries, and batches them to SendPost’s event ingestion endpoint.
See Event Reporting Agent for configuration, log path, and health checks.
Step 5: Configure IP Pool for Custom SMTP Routing
- Go to Settings → IP Pools
- Create a new IP Pool or edit an existing one
- Configure routing so that traffic is sent to your Custom SMTP TPSP (e.g., set a percentage or use it as primary/failover)
- Save. Use the pool name in API calls via the
ippoolparameter.
Step 6: Send Test Email
Use the Send Test button in the provider setup (or send via API with the correctippool). Confirm:
- CSProcessed – message queued
- CSSent – your MTA returned 2xx (accepted for delivery)
- CSOpen / CSClick – if tracking is enabled
- CSDelivered – after the agent reports from your MTA logs (if agent is installed)
Setup Checklist in UI
After creation, the dashboard shows:- SMTP connectivity: ✓ (verified at creation)
- Agent status: ✓ when
agent_last_seen_atis recent, or ⚠️ if the agent has not reported yet or is stale
Next Steps
- Send emails via Custom SMTP using the SendPost API
- Configure the event agent for delivered/bounced/deferred events
- View event types and analytics