postal icon indicating copy to clipboard operation
postal copied to clipboard

MessageBounced event lacks RFC code for bounce type (Hard or Soft bounce)

Open benstaf opened this issue 1 year ago • 2 comments

MessageBounced event lacks RFC code to identify Bounce type:

Screenshot_2024-08-14-19-07-14-456_com android chrome-edit

SendGrid documentation explains that bounce message gives important information to identify the reason for the email delivery failure: the RFC code. According to the RFC, hard bounces are depicted by a 5XX code and soft bounces by a 4XX code (in general)

The best practice is that upon reception of the webhook, the mailing list software (Mautic, etc...) should unsubscribe hard bounces immediately, and leave soft bounces.

That's why bounce type is included in webhooks of all providers: Mailgun, Postmark, Amazon and others

However, bounce type seems missing from Postal bounce webhook

I can help for implementation if it hasn't been done before

benstaf avatar Aug 14 '24 18:08 benstaf

If you want to make a PR then go for it, I'm not sure where the information could be sourced from off the top of my head

willpower232 avatar Aug 15 '24 08:08 willpower232

If you want to make a PR then go for it, I'm not sure where the information could be sourced from off the top of my head

There are several special-purpose libraries for bounce classification, my favorite is Sisimai and it's written in Ruby.

It is quite popular on GitHub, mature and well-maintained (10 years old, latest version in July 2024)

Sisimai can decode all types of bounces with optimized accuracy and speed, and especially make the classification of Hard and Soft bounces (critical feature currently lacking on Postal)

Screenshot_2024-08-15-21-14-14-228_com android chrome-edit

Sisimai also handles FBL complaints mentioned in issue https://github.com/postalserver/postal/issues/3084

Sisimai integration will improve and simplify the way Postal handles bounces

I can do a PR of course, but since it will require an in-depth modification of the codebase, more core contributors might prefer to do it.

Let me know either way

benstaf avatar Aug 15 '24 19:08 benstaf

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Sep 15 '24 02:09 github-actions[bot]