Deliverability
Email deliverability best practices and configuration
Overview
Deliverability is the measure of whether your emails reach recipients' inboxes (not spam folders). For AI agents sending email at scale, high deliverability is critical to operational success.
daimon.email handles most deliverability infrastructure automatically (SPF, DKIM, DMARC), but agent developers must follow best practices to maintain good sender reputation.
Info
daimon.email's shared IP pool maintains 98%+ deliverability for customers following best practices. Enterprise customers get dedicated IPs for full reputation control.
How Email Deliverability Works
When you send an email, recipient mail servers (Gmail, Outlook, etc.) perform multiple checks:
graph TD
A[Agent sends email] --> B[daimon.email SMTP]
B --> C[SPF Check]
C --> D[DKIM Signature]
D --> E[DMARC Policy]
E --> F[Spam Filters]
F --> G[Recipient Reputation Check]
G --> H{Deliver?}
H -->|Pass| I[Inbox]
H -->|Fail| J[Spam Folder]
H -->|Block| K[Rejected]
style I fill:#27ae60
style J fill:#f39c12
style K fill:#e74c3cThe Three Pillars of Authentication
| Protocol | Purpose | daimon.email Status |
|---|---|---|
| SPF | Verifies sender IP is authorized | ✅ Configured automatically |
| DKIM | Cryptographic signature proves authenticity | ✅ Configured automatically |
| DMARC | Policy for handling authentication failures | ✅ Configured automatically |
You don't need to configure these manually — daimon.email handles all three for @daimon.email addresses and custom domains.
SPF (Sender Policy Framework)
SPF specifies which mail servers can send email on behalf of your domain.
daimon.email Default Configuration
The daimon.email domain has SPF configured:
daimon.email. TXT "v=spf1 include:_spf.daimon.email ~all"This authorizes daimon.email's SMTP servers to send on behalf of *@daimon.email addresses.
Custom Domain SPF
If you use a custom domain (paid tier feature), add this SPF record:
yourdomain.com. TXT "v=spf1 include:_spf.daimon.email ~all"Note
If you already have an SPF record (e.g., for Google Workspace), merge them:
yourdomain.com. TXT "v=spf1 include:_spf.google.com include:_spf.daimon.email ~all"Verifying SPF
# Check SPF record
dig TXT daimon.email +short
# Expected output:
# "v=spf1 include:_spf.daimon.email ~all"nslookup -type=TXT daimon.email
# Expected output:
# daimon.email text = "v=spf1 include:_spf.daimon.email ~all"DKIM (DomainKeys Identified Mail)
DKIM adds a cryptographic signature to email headers, proving the message wasn't tampered with.
How DKIM Works
- daimon.email signs outbound emails with a private key
- Public key is published in DNS
- Recipient server verifies signature using public key
- If signature is valid, email is trusted
daimon.email DKIM Configuration
DKIM is automatically configured for all @daimon.email addresses. No setup required.
Example DKIM signature header:
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=daimon.email; s=2026; t=1742050800;
h=from:to:subject:date:message-id;
bh=3kL9xYw2qRn4zBc5...;
b=9kL2xYw1pQm3zBc5...Custom Domain DKIM
For custom domains, daimon.email generates a unique DKIM key pair and provides DNS records:
// Get DKIM DNS records for custom domain
const domain = await client.domains.get('yourdomain.com');
console.log(domain.dkim_records);
// [
// {
// type: "TXT",
// name: "daimon._domainkey.yourdomain.com",
// value: "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC..."
// }
// ]
// Add these records to your DNS, then verify
await client.domains.verifyDkim('yourdomain.com');# Get DKIM DNS records
domain = client.domains.get('yourdomain.com')
for record in domain.dkim_records:
print(f"{record['type']} {record['name']} = {record['value']}")
# Add to DNS, then verify
client.domains.verify_dkim('yourdomain.com')DMARC (Domain-based Message Authentication)
DMARC tells recipient servers what to do if SPF or DKIM checks fail.
daimon.email DMARC Policy
_dmarc.daimon.email. TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@daimon.email"| Field | Value | Meaning |
|---|---|---|
p=quarantine | Quarantine | Send to spam if authentication fails |
rua=mailto:dmarc@daimon.email | Reporting | Send aggregate reports to daimon.email |
pct=100 | 100% | Apply policy to all messages |
Custom Domain DMARC
For custom domains, configure DMARC to enforce authentication:
_dmarc.yourdomain.com. TXT "v=DMARC1; p=reject; rua=mailto:dmarc-reports@yourdomain.com; pct=100"Note
Start with p=none to monitor without enforcement, then graduate to p=quarantine and finally p=reject as you verify deliverability.
Maintaining Sender Reputation
Even with perfect authentication, sending patterns affect deliverability:
Best Practices
Warm Up Gradually
Don't send 10k emails on day 1. Start with 100/day, double weekly until you reach target volume.
Monitor Bounce Rates
Keep bounce rate below 5%. Remove invalid addresses immediately.
Respect Unsubscribes
Honor unsubscribe requests within 24 hours. Include one-click unsubscribe links.
Avoid Spam Triggers
Don't use ALL CAPS, excessive punctuation!!!, or spammy keywords (FREE, ACT NOW).
IP Warm-up Schedule (Enterprise Dedicated IPs)
If you have a dedicated IP, warm it up gradually:
| Week | Daily Send Volume | Notes |
|---|---|---|
| 1 | 100 emails/day | Start with engaged recipients |
| 2 | 500 emails/day | Monitor bounce/complaint rates |
| 3 | 2,000 emails/day | Expand to broader audience |
| 4 | 5,000 emails/day | Continue monitoring |
| 5 | 10,000 emails/day | Nearly at full capacity |
| 6+ | 20,000+ emails/day | Full capacity, maintain reputation |
Info
Shared IP pools (Starter/Pro tiers) are already warmed up. You can send at full capacity immediately.
Monitoring Deliverability
Check Bounce and Complaint Rates
// Get deliverability metrics
const metrics = await client.account.getDeliverability();
console.log(metrics);
// {
// sends_30d: 12450,
// bounces_30d: 215,
// bounce_rate: 0.017, // 1.7% (healthy)
// complaints_30d: 3,
// complaint_rate: 0.0002, // 0.02% (excellent)
// spam_score: 0.2, // Lower is better (0-10 scale)
// reputation: "excellent" // "excellent" | "good" | "fair" | "poor"
// }
if (metrics.bounce_rate > 0.05) {
console.warn('Bounce rate above 5%! Clean your email list.');
}
if (metrics.complaint_rate > 0.001) {
console.warn('Complaint rate above 0.1%! Review content and targeting.');
}# Get deliverability metrics
metrics = client.account.get_deliverability()
print(f"Bounce rate: {metrics['bounce_rate'] * 100:.2f}%")
print(f"Complaint rate: {metrics['complaint_rate'] * 100:.3f}%")
print(f"Reputation: {metrics['reputation']}")
if metrics['bounce_rate'] > 0.05:
print('WARNING: Bounce rate above 5%!')
if metrics['complaint_rate'] > 0.001:
print('WARNING: Complaint rate above 0.1%!')Acceptable Thresholds
| Metric | Excellent | Good | Fair | Poor |
|---|---|---|---|---|
| Bounce Rate | <2% | 2-5% | 5-10% | >10% |
| Complaint Rate | <0.1% | 0.1-0.3% | 0.3-0.5% | >0.5% |
| Spam Score | 0-1 | 1-3 | 3-6 | >6 |
Bounce Types
| Type | Description | Action Required |
|---|---|---|
| Hard Bounce | Permanent failure (invalid address) | Remove from list immediately |
| Soft Bounce | Temporary failure (mailbox full) | Retry up to 3 times, then remove |
| Block | Recipient server rejected (blocklist) | Investigate sender reputation |
Handling Bounces
Subscribe to bounce webhooks to maintain list hygiene:
// Subscribe to bounce events
await client.webhooks.create({
url: 'https://your-agent.com/webhooks/daimon',
events: ['message.bounced', 'message.complained'],
});
// Handle bounces
app.post('/webhooks/daimon', async (req, res) => {
const event = req.body;
if (event.type === 'message.bounced') {
const { to, bounce_type, bounce_reason } = event.data;
if (bounce_type === 'permanent') {
// Remove from your mailing list
await removeEmailFromList(to[0]);
console.log(`Removed ${to[0]} due to hard bounce`);
}
}
if (event.type === 'message.complained') {
const { to } = event.data;
// Mark as unsubscribed
await unsubscribeEmail(to[0]);
console.log(`Unsubscribed ${to[0]} due to spam complaint`);
}
res.json({ received: true });
});# Handle bounce webhook
@app.route('/webhooks/daimon', methods=['POST'])
def handle_webhook():
event = request.json
if event['type'] == 'message.bounced':
to_email = event['data']['to'][0]
bounce_type = event['data']['bounce_type']
if bounce_type == 'permanent':
remove_email_from_list(to_email)
print(f"Removed {to_email} due to hard bounce")
if event['type'] == 'message.complained':
to_email = event['data']['to'][0]
unsubscribe_email(to_email)
print(f"Unsubscribed {to_email} due to spam complaint")
return {'received': True}Custom Domains (Paid Tiers)
Custom domains improve trust and deliverability for your brand.
Setting Up a Custom Domain
// Add custom domain to your account
const domain = await client.domains.create({
domain: 'yourdomain.com',
});
console.log(domain.dns_records);
// [
// { type: "MX", name: "yourdomain.com", value: "mx1.daimon.email", priority: 10 },
// { type: "MX", name: "yourdomain.com", value: "mx2.daimon.email", priority: 20 },
// { type: "TXT", name: "yourdomain.com", value: "v=spf1 include:_spf.daimon.email ~all" },
// { type: "TXT", name: "daimon._domainkey.yourdomain.com", value: "v=DKIM1; k=rsa; p=..." },
// { type: "TXT", name: "_dmarc.yourdomain.com", value: "v=DMARC1; p=quarantine; rua=..." }
// ]
// Add these records to your DNS provider, then verify
await client.domains.verify('yourdomain.com');# Add custom domain
domain = client.domains.create(domain='yourdomain.com')
for record in domain.dns_records:
print(f"{record['type']} {record['name']} = {record['value']}")
# Add to DNS, then verify
client.domains.verify('yourdomain.com')Once verified, create inboxes on your custom domain:
const inbox = await client.inboxes.create({
address: 'agent',
domain: 'yourdomain.com', // Creates agent@yourdomain.com
});Avoiding Spam Filters
Modern spam filters use machine learning to detect unwanted email. Follow these guidelines:
Content Best Practices
✅ Do:
- Write naturally, like a human would
- Use proper grammar and punctuation
- Include plain text version (not just HTML)
- Personalize with recipient's name or context
- Include a physical mailing address (required by CAN-SPAM)
- Provide clear unsubscribe link
❌ Don't:
- Use ALL CAPS IN SUBJECT LINES
- Overuse exclamation points!!!
- Use spammy words (FREE, URGENT, ACT NOW, WINNER)
- Send only images (must have text content)
- Use link shorteners (bit.ly, tinyurl) — they look suspicious
- Send large attachments (>5MB) unsolicited
Subject Line Examples
| Bad | Good |
|---|---|
| 🚨 URGENT: CLAIM YOUR FREE PRIZE NOW!!! | You've been selected for our beta program |
| RE: RE: RE: Important | Following up on our conversation |
| $$$ Make Money Fast $$$ | Q1 revenue report attached |
| Click here!!!! | Your invoice is ready |
HTML/Text Balance
Always include both HTML and plain text versions:
await client.inboxes.send(inboxId, {
to: 'recipient@company.com',
subject: 'Your monthly report',
text: 'Hi John,\n\nAttached is your monthly report...',
html: '<p>Hi John,</p><p>Attached is your monthly report...</p>',
});Emails with only HTML (no text fallback) have higher spam scores.
Testing Deliverability
Before sending to your full list, test with these tools:
Mail-Tester
- Send a test email to the address provided by mail-tester.com
- Check your spam score (aim for 9/10 or higher)
- Review recommendations and fix issues
Gmail Postmaster Tools
For high-volume senders, use Gmail Postmaster Tools:
- Monitor domain reputation
- Track spam rate
- See authentication status (SPF/DKIM/DMARC)
- Analyze delivery errors
Note
Gmail Postmaster requires sending 100+ emails/day to Gmail addresses before showing data.
Enterprise Deliverability Features
Enterprise tier customers get advanced deliverability controls:
| Feature | Description |
|---|---|
| Dedicated IP | Your own IP address with independent reputation |
| Custom Reverse DNS | PTR record points to your domain |
| Feedback Loops | Direct integration with Gmail/Yahoo/Outlook feedback |
| Deliverability Consulting | Expert review of content and sending patterns |
| Priority Support | Dedicated Slack channel for deliverability issues |
Contact sales for enterprise pricing: sales@daimon.email
Troubleshooting Common Issues
"Your emails are going to spam"
- Check SPF/DKIM/DMARC alignment with MXToolbox
- Review content for spam triggers
- Check bounce/complaint rates
- Verify sender domain reputation
- Warm up sending volume gradually
"High bounce rate"
- Remove invalid addresses immediately
- Use double opt-in for new subscribers
- Regularly clean inactive contacts
- Verify email format before sending
"Spam complaint rate increasing"
- Review email content for misleading subject lines
- Ensure unsubscribe link is prominent
- Segment audience to improve relevance
- Reduce send frequency
Next Steps
- Sending & Receiving - Email flow overview
- IMAP & SMTP - Protocol-level access
- API Reference: Get Deliverability - Metrics API