Postmark bounce support?

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:

3개의 좋아요

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.

3개의 좋아요

Also, we haven’t used any “Bounce API” but rather “Bounce Webhooks” which is documented here

5개의 좋아요

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

3개의 좋아요

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.

6개의 좋아요

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: add postmark webhook handling by pfaffman · Pull Request #8919 · discourse/discourse · GitHub

6개의 좋아요

It’s merged! Thanks!

5개의 좋아요

@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.

More info — The Postmark PR to handle webhooks doesn’t work

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.

4개의 좋아요