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

Sendgrid and bounce processing #1177

Closed
malv007 opened this issue Feb 7, 2023 · 5 comments
Closed

Sendgrid and bounce processing #1177

malv007 opened this issue Feb 7, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@malv007
Copy link

malv007 commented Feb 7, 2023

Does the SendGrid webhook associate bounces to a particular campaign? It looks like this only works with SES. Is that right? Is there a plan to implement the campaign header parsing/processing for the SendGrid webhook too?
Thanks!

@knadh
Copy link
Owner

knadh commented Feb 7, 2023

It does indeed.

image

@knadh knadh closed this as completed Feb 7, 2023
@knadh knadh added the question Further information is requested label Feb 7, 2023
@malv007
Copy link
Author

malv007 commented Feb 7, 2023

Sorry, I don't think I explained myself correctly. Listmonk can receive bounces from SendGrid, and we can see the information in the Subscribers > Bounces menur, but they don't seem to get linked to a campaign.

Using the SES webhook we can see how the bounces getting linked to the campaign (method ProcessBounce):

// Look for the campaign ID in headers.

But the SendGrid webhook doesn't seem to have any logic similar to that. Is there a plan to implement that? Is there a workaround to implement such a function?

We are already adding the X-SMTPAPI header to all of our campaigns in order for SendGrid to include the campaign UUID in their request (as "X-Listmonk-Campaign"), but since the SendGrid webhook in listmonk doesn't parse this information, like the SES one does, then the bounces don't get linked.

@knadh Are we understanding this right?

@knadh
Copy link
Owner

knadh commented Feb 7, 2023

Ah, my bad. If I understand this correctly, you can configure SendGrid to send X-SMTPAPI: {"X-Listmonk-Campaign": "xxx"} which will be available in the webhook?

If yes, this should be easy to implement in the upcoming release.

@knadh knadh reopened this Feb 7, 2023
@malv007
Copy link
Author

malv007 commented Feb 7, 2023

No worries, I am sure having to go through all the request/questions isn't easy.

Yes, SendGrid can be configured to send back additional information.

But one thing we have noticed in the bounce information displayed in Listmonk, is that the dashes get eliminated and X-Listmonk-Campaign gets turned into xListmonkCampaign . See the attached screenshot. Is Listmonk doing that format change in order to display the information? If not it must be SendGrid making that format change.
image

But when I look at the SendGrid logs I can see the dashes. See screenshot.
image

It would be awesome to get this implemented. Let me know in case you need me to test anything. Thanks a lot!

@knadh
Copy link
Owner

knadh commented Feb 8, 2023

That would be SendGrid stripping dashes. listmonk stores the metadata as-is.

This is straight forward to implement. Will include this in the upcoming version. Thanks for highlighting this.

@knadh knadh added enhancement New feature or request and removed question Further information is requested labels Feb 8, 2023
@knadh knadh self-assigned this Feb 8, 2023
@knadh knadh closed this as completed in da377d8 Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants