Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MessageBounced Webhook not sent #2500

Closed
vkperumal opened this issue Jun 15, 2023 · 6 comments
Closed

MessageBounced Webhook not sent #2500

vkperumal opened this issue Jun 15, 2023 · 6 comments
Labels

Comments

@vkperumal
Copy link

vkperumal commented Jun 15, 2023

Describe the bug

Even though the message is categorized as bounce, webhook is not getting triggered

SPF, DKIM and Return path have been configured

Postal Version: 2.1.4

Expected behaviour

Webhook should be triggered

Screenshots

image

Bounce Webhook Configuration
image

Webhook History
image

@vkperumal vkperumal added the bug label Jun 15, 2023
@lvaro22
Copy link

lvaro22 commented Aug 2, 2023

I have the same problem. Other type of webhooks are sent perfectly, but bounced ones not.
¿Any solution? ¿Or it is a version bug?

@willpower232
Copy link
Collaborator

The code still seems present so I'm not sure what the problem could be.

def bounce!(bounce_message)
create_delivery("Bounced", details: "We've received a bounce message for this e-mail. See <msg:#{bounce_message.id}> for details.")
SendWebhookJob.queue(:main, server_id: database.server_id, event: "MessageBounced", payload: { _original_message: id, _bounce: bounce_message.id })
end

if queued_message.message.bounce
log "#{log_prefix} Message is a bounce"
original_messages = queued_message.message.original_messages
unless original_messages.empty?
for original_message in queued_message.message.original_messages
queued_message.message.update(bounce_for_id: original_message.id, domain_id: original_message.domain_id)
queued_message.message.create_delivery("Processed", details: "This has been detected as a bounce message for <msg:#{original_message.id}>.")
original_message.bounce!(queued_message.message)
log "#{log_prefix} Bounce linked with message #{original_message.id}"

If you're able to trigger a bounce yourself, you could try watching the logs for the workers and see if they log anything relevant but that might be challenging depending on how busy they are.

@vkperumal
Copy link
Author

vkperumal commented Aug 2, 2023

I was able to solve the problem by adding below to config/application.rb file seeing from one of the pull request.

https://github.com/postalserver/postal/pull/2477/files

config.active_record.yaml_column_permitted_classes = [Symbol, Hash, Array, ActiveSupport::HashWithIndifferentAccess]

Then I was able to get Bounce Webhooks.

@lvaro22
Copy link

lvaro22 commented Aug 30, 2023

It works !

Thank you so much.

@ReptoxX
Copy link

ReptoxX commented Nov 22, 2023

This issue is still persisting and #2477 indeed fixes that.
Is this ever going to get merged?

@chrisdeeming
Copy link

Apologies for this. I am also encountering this issue.

Is anyone able to write an idiots guide (for me, an idiot) on how to patch this directly? Assume I know barely anything about Docker and even less about Ruby.

Particularly @vkperumal as it sounds like you may have done this before :)

Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants