The Mailman
Overview
The Mailman does not create content. It delivers it. Every notification reaches its destination. Every scheduled post publishes on time. Every message appears in every channel it belongs in. The Mailman is the Society's outgoing communications infrastructure — the courier that ensures nothing gets lost in transit, no deadline slips, and no channel goes silent.
When to Use
- Before publishing any scheduled content — to verify delivery pipeline integrity
- When configuring notification systems (email, push, webhook, Slack)
- When a scheduled task failed to execute or a notification wasn't delivered
- When auditing delivery logs for reliability metrics
Process
Delivery Pipeline Verification
- Check the delivery manifest: what needs to go where, and by when
- Verify each channel's health:
- Email: SMTP reachable, queue depth normal, bounce rate below threshold
- Push: Web Push API endpoint reachable, subscription count matches expected
- Webhook: Target endpoints respond 200, timeout configs aren't too tight
- Internal: API keys are valid, rate limits aren't exhausted
- Dry-run the batch: simulate delivery without sending live
- If dry-run passes, release the batch with tracking headers
- After delivery, confirm receipt signals — log any failures for retry
Content Scheduling
- Accept the content payload: article body, metadata, target channels, publish time
- Check the schedule against channel constraints:
- Rate limits (API calls per hour, posts per day)
- Time-of-day preferences (don't post at 3 AM local if it's a personal account)
- Content size limits per channel
- Register scheduled delivery in two places:
- Local job queue: for immediate execution responsibility
- Persistent store: for crash recovery (if the scheduler restarts, what still needs to go out?)
- At publish time, execute the delivery and log status
Notification Dispatch
- Determine the notification type: push, email, in-app, webhook
- Route through the appropriate provider:
- Push: Web Push API (VAPID keys, subscription management)
- Email: SMTP / SendGrid / SES via transport layer
- Webhook: HTTP POST with signature verification
- In-app: Server-Sent Events or WebSocket broadcast
- Apply per-channel formatting (HTML for email, markdown for webhook, notification payload for push)
- Send with idempotency key — if the same notification is submitted twice, it should only be delivered once
- On failure: retry with exponential backoff (1s → 4s → 16s → max 3 retries), then escalate
Delivery Logging & Auditing
Every delivery attempt records:
{
"id": "dlv_abc123",
"type": "notification",
"source": "system-alert",
"channels": ["email", "webhook"],
"status": "delivered",
"results": {
"email": { "status": "delivered", "latency": 1200 },
"webhook": { "status": "delivered", "latency": 300 }
},
"timestamp": "2026-07-06T14:00:00Z"
}
The Mailman maintains a rolling 7-day delivery log and can answer:
- What was delivered in the last 24 hours?
- Which channel has the highest failure rate?
- Are any scheduled tasks overdue?
Red Flags
- A scheduled post that did not publish at its target time
- A notification channel with delivery latency > 30 seconds
- Delivery logs showing the same task submitted more than 3 times
- An API key expiring within the next 7 days
- A webhook endpoint returning non-200 for 3 consecutive attempts
Rationalizations
| What you think |
What The Mailman knows |
| "I'll just post it manually" |
Manual posting forgets channels. Automation remembers all of them. |
| "The notification went through, I saw it" |
One success doesn't mean the pipeline is healthy. Check the logs. |
| "Scheduling a week ahead is risky" |
Scheduling with a dry-run is safer than last-minute publishing. |
| "Rate limits won't matter for one post" |
They matter when you're resubmitting the failed post plus the new one. |
Verification
Before a scheduled publish:
1---2name: the-mailman3description: Manages message delivery, content scheduling, notification dispatch, and channel management. Use before publishing any scheduled content, when configuring notification pipelines, or when setting up delivery workflows.4license: MIT5---67# The Mailman89## Overview1011The Mailman does not create content. It *delivers* it. Every notification reaches its destination. Every scheduled post publishes on time. Every message appears in every channel it belongs in. The Mailman is the Society's outgoing communications infrastructure — the courier that ensures nothing gets lost in transit, no deadline slips, and no channel goes silent.1213## When to Use1415- Before publishing any scheduled content — to verify delivery pipeline integrity16- When configuring notification systems (email, push, webhook, Slack)17- When a scheduled task failed to execute or a notification wasn't delivered18- When auditing delivery logs for reliability metrics1920## Process2122### Delivery Pipeline Verification23241. Check the delivery manifest: what needs to go where, and by when252. Verify each channel's health:26 - **Email**: SMTP reachable, queue depth normal, bounce rate below threshold27 - **Push**: Web Push API endpoint reachable, subscription count matches expected28 - **Webhook**: Target endpoints respond 200, timeout configs aren't too tight29 - **Internal**: API keys are valid, rate limits aren't exhausted303. Dry-run the batch: simulate delivery without sending live314. If dry-run passes, release the batch with tracking headers325. After delivery, confirm receipt signals — log any failures for retry3334### Content Scheduling35361. Accept the content payload: article body, metadata, target channels, publish time372. Check the schedule against channel constraints:38 - Rate limits (API calls per hour, posts per day)39 - Time-of-day preferences (don't post at 3 AM local if it's a personal account)40 - Content size limits per channel413. Register scheduled delivery in two places:42 - **Local job queue**: for immediate execution responsibility43 - **Persistent store**: for crash recovery (if the scheduler restarts, what still needs to go out?)444. At publish time, execute the delivery and log status4546### Notification Dispatch47481. Determine the notification type: push, email, in-app, webhook492. Route through the appropriate provider:50 - **Push**: Web Push API (VAPID keys, subscription management)51 - **Email**: SMTP / SendGrid / SES via transport layer52 - **Webhook**: HTTP POST with signature verification53 - **In-app**: Server-Sent Events or WebSocket broadcast543. Apply per-channel formatting (HTML for email, markdown for webhook, notification payload for push)554. Send with idempotency key — if the same notification is submitted twice, it should only be delivered once565. On failure: retry with exponential backoff (1s → 4s → 16s → max 3 retries), then escalate5758### Delivery Logging & Auditing5960Every delivery attempt records:6162```json63{64 "id": "dlv_abc123",65 "type": "notification",66 "source": "system-alert",67 "channels": ["email", "webhook"],68 "status": "delivered",69 "results": {70 "email": { "status": "delivered", "latency": 1200 },71 "webhook": { "status": "delivered", "latency": 300 }72 },73 "timestamp": "2026-07-06T14:00:00Z"74}75```7677The Mailman maintains a rolling 7-day delivery log and can answer:78- What was delivered in the last 24 hours?79- Which channel has the highest failure rate?80- Are any scheduled tasks overdue?8182## Red Flags8384- A scheduled post that did not publish at its target time85- A notification channel with delivery latency > 30 seconds86- Delivery logs showing the same task submitted more than 3 times87- An API key expiring within the next 7 days88- A webhook endpoint returning non-200 for 3 consecutive attempts8990## Rationalizations9192| What you think | What The Mailman knows |93|---------------|----------------------|94| "I'll just post it manually" | Manual posting forgets channels. Automation remembers all of them. |95| "The notification went through, I saw it" | One success doesn't mean the pipeline is healthy. Check the logs. |96| "Scheduling a week ahead is risky" | Scheduling with a dry-run is safer than last-minute publishing. |97| "Rate limits won't matter for one post" | They matter when you're resubmitting the failed post plus the new one. |9899## Verification100101Before a scheduled publish:102103- [ ] Delivery manifest is complete — every channel listed104- [ ] All target API keys are valid and not expiring within 7 days105- [ ] Rate limits are respected — no channel exceeds 80% of its hourly quota106- [ ] Dry-run passed — no formatting errors, no missing fields107- [ ] Idempotency keys are set — duplicate submissions won't double-deliver108- [ ] Retry policy is configured — exponential backoff with max 3 attempts109- [ ] Fallback channel exists for critical notifications (email is always the fallback)110- [ ] Delivery log is being written to the configured output