Postmark allows you to generate fake bounces by sending messages to our black hole domain. Any test bounces sent to Postmark’s black hole domain behave like other bounces in Postmark.
This will let you see how a bounce appears in Postmark’s UI, test our Bounces API and Bounces webhooks, all without having to email test@example.com and worry that your sending reputation may be affected
To generate these fake bounces, Postmark offers a black hole domain: bounce-testing.postmarkapp.com.
This works by setting the type of bounce that you’d like to generate, like a hard bounce. All Bounce Type events listed in our Bounce API Docs are supported (except for SpamComplaint). Like Sandboxed messages, messages to create fake bounces count towards your monthly email sending volume but fake bounces are not counted towards bounce limits.
There are two ways to trigger a fake bounce.
For each bounce type, we’ve set up a dedicated address to help you generate a fake bounce for it.
For example, if you’d like to create a hard bounce, you can send an email to hardbounce@bounce-testing.postmarkapp.com. It also supports camel case and is case insensitive, meaning Hard_Bounce@bounce-testing.postmarkapp.com also works. If you’re triggering a hard bounce, the fake bounce address is also added to the Stream’s Suppression list.
Other examples:
For a full list of all possible black hole addresses, check out our test bounces help doc.
Postmark also supports a custom message header to trigger a fake bounce when sending to our black hole domain. That’s X-PM-Bounce-Type and is paired with the bounce type you’d like to generate. For example, to generate an ISP Block, pass blocked with the header value. This works with our API and SMTP for sending messages.
Here’s an example JSON body format for creating a soft bounce
{
"From": "sender@example.com",
"To": "test@bounce-testing.postmarkapp.com",
"Subject": "Bounce",
"TextBody": "This will bounce",
"ReplyTo": "reply@example.com",
"TrackOpens": true,
"TrackLinks": "None",
"MessageStream": "outbound",
"Headers": [{
"Name": "X-PM-Bounce-Type",
"Value": "SoftBounce"
}]
}
An example curl request:
curl "https://api.postmarkapp.com/email" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Postmark-Server-Token: server token" \
-d '{
"From": "sender@example.com",
"To": "test@bounce-testing.postmarkapp.com",
"Subject": "Bounce",
"TextBody": "This will bounce",
"ReplyTo": "reply@example.com",
"TrackOpens": true,
"TrackLinks": "None",
"MessageStream": "outbound",
"Headers": [{
"Name": "X-PM-Bounce-Type",
"Value": "SoftBounce"
}]
}'