I’m a big fan of Postmarkapp.com
We use their bounce API to create tickets when emails need attention.
What would it take to expand Discourse’s Bounce Processing to support Postmark?
See:
I’m a big fan of Postmarkapp.com
We use their bounce API to create tickets when emails need attention.
What would it take to expand Discourse’s Bounce Processing to support Postmark?
See:
We only support adding these sorts of things for mail services that have a free tier. Otherwise it doesn’t benefit enough people.
And for our hosted customers, we handle all email, so there’s no reason to do it for our customers.
Also, we haven’t used any “Bounce API” but rather “Bounce Webhooks” which is documented here
Would you consider a PR for postmark bounce webook support now? mailgun, one of the officially supported bounce providers, has now moved away their free tier. I get the impression that free-tiers are generally going away in this industry: Tell HN: Mailgun lowers free-tier API from 10k to 625 emails per month | Hacker News
A PR would certainly be considered. Please communicate early if this providers differs too much from the current supported ones so we can offer feedback on the mergeability of your approach.
I’ve got this that I’m about to submit a PR.
Using the test curl
command that they document here on my development instance it looks like it will work.
I included spec
tests for both hard and soft bounces.
EDIT: I’ve now done tests triggering from their webhook test interface and it looks like it actually works.
I think this should be OK: https://github.com/discourse/discourse/pull/8919
It’s merged! Thanks!
@wesochuck suggests the following changes to Bounce types (see Bounce API | Postmark Developer Documentation for definitions of bounce types, though I’ve included them below).
To hard_bounces
add:
BadEmailAddress
– “Invalid email address — The address is not a valid email address.”Blocked
" ISP block — Blocked from this ISP due to content or blacklisting."To Soft bounces add:
SMTPApiError
– " SMTP API error — An error occurred while accepting an email through the SMTP API."DMARCPolicy
– “DMARC Policy — Email rejected due DMARC Policy.”I think that blocked
makes sense, but I’m not sure about the rest. Let me know what you think and I’ll make the PR accordingly.
Sorry, but my PR doesn’t work.
First, Postmark throws away the message-id by default.
Second, the MessageID
that Postmark includes in the webhook isn’t the Message-ID
that is in the message.
From: Everything you need to know about SMTP (Simple Mail Transfer Protocol) | Postmark
Is there an easy way to add a X-PM-KeepID: true
header in outgoing mail? Could that be added to core?
If that problem gets solved, then I’ll see about whether there is a way to have the actual Message-ID
included in the webhook payload and process it accordingly.