A WordPress site sends 10,000 newsletters a month. Two percent of those addresses are dead — typos at signup, accounts abandoned years ago, autoresponders to former employees. Without bounce handling, the site sends the next campaign to the same 200 dead addresses. Each one returns a hard bounce. The sending IP’s reputation drops. The next month, the campaign that should have hit Gmail inbox lands in Promotions instead. The fix is the bounce loop — closed at the provider level, fed back into WordPress so the next campaign skips those addresses.
What’s happening
Bounces come in two categories:
- Hard bounce — Permanent failure. The address doesn’t exist, the domain doesn’t exist, or the receiving server permanently rejected. Resending will fail again and burn reputation.
- Soft bounce — Temporary failure. The mailbox is full, the receiver is over its rate limit, the message was too large. Resending later may succeed.
Each upstream provider exposes bounce data differently:
- Postmark — Webhooks for
BounceandSpamComplaintevents, plus a suppression list the API exposes. Hard bounces are automatically suppressed; sending to a suppressed address fails fast. - Amazon SES — SNS notifications for
Bounce(with sub-types likePermanentandTransient) andComplaint. You subscribe a Lambda or HTTPS endpoint. - Mailgun — Webhooks for
bounced,complained,unsubscribed. Also exposes a suppression list via API. - SendGrid — Event Webhooks for the same event types.
WordPress doesn’t know about any of this unless you wire the webhook back into the WordPress user table or the newsletter plugin’s subscriber table. Without it, the bounce data lives in the upstream and WordPress keeps sending.
How to verify
For Postmark:
curl -s -H "X-Postmark-Server-Token: $POSTMARK_SERVER_TOKEN" \
"https://api.postmarkapp.com/bounces?count=10" | jq '.Bounces[].Email'
For SES:
aws ses list-suppressed-destinations --region us-east-1 \
| jq '.SuppressedDestinationSummaries[].EmailAddress'
For Mailgun:
curl -s --user "api:$MAILGUN_API_KEY" \
"https://api.mailgun.net/v3/example.com/bounces?limit=10" | jq '.items[].address'
Then compare against the WordPress user table or the newsletter subscriber table:
wp db query "SELECT user_email FROM wp_users WHERE user_email IN ('bad1@x.com','bad2@x.com')"
wp db query "SELECT email, status FROM wp_fc_subscribers WHERE email IN ('bad1@x.com','bad2@x.com')"
If those bounced addresses still show status='subscribed' in WordPress, the loop is open.
The fix
-
Subscribe to the bounce webhook at the upstream. Each provider has a configuration UI for this. Point it at a WordPress endpoint — a custom REST route or a plugin-provided endpoint.
-
Implement the webhook handler. A minimal mu-plugin pattern:
<?php add_action('rest_api_init', function() { register_rest_route('sh/v1', '/bounce', [ 'methods' => 'POST', 'callback' => function($req) { $event = $req->get_json_params(); // Verify signature first - skipped here for brevity if (in_array($event['event'] ?? '', ['bounced','spamreport','complained'])) { $email = $event['recipient'] ?? $event['Email'] ?? ''; if ($email) { $user = get_user_by('email', $email); if ($user) { update_user_meta($user->ID, 'sh_email_bounced', current_time('c')); } } } return ['ok' => true]; }, 'permission_callback' => '__return_true', ]); }); -
Verify the webhook signature. Each provider signs the payload. Skipping signature verification means anyone can flag arbitrary addresses as bounced. Postmark uses HMAC; Mailgun uses HMAC with the API key; SES uses SNS signature verification.
-
Update the user table on bounce. Add
sh_email_bouncedmeta or a custom flag, then check it in thewp_mailfilter:add_filter('wp_mail', function($args) { $to = is_array($args['to']) ? $args['to'][0] : $args['to']; $user = get_user_by('email', $to); if ($user && get_user_meta($user->ID, 'sh_email_bounced', true)) { $args['to'] = []; // Cancels the send } return $args; }); -
Sync to the newsletter plugin’s subscriber table. MailPoet, Newsletter, and FluentCRM all have an “unsubscribed” status or a “bounced” status. Update the subscriber row instead of just user meta.
-
Expose the bounce data in wp-admin. A simple admin page that lists bounced addresses, with a “verify and re-enable” button for the case where the customer fixed their mailbox. On managed enterprise WordPress hosting sites, the bounce panel is part of the standard admin surface.
Stack Harbor wires the bounce loop end-to-end as part of managed enterprise WordPress hosting deliverability operations — webhook subscription, signature verification, user table sync, and the wp-admin surface. If your WordPress newsletter or transactional sends are degrading and the upstream shows piling bounces that WordPress never sees, closing the loop is the engagement.