-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bounce processing #166
Comments
I use Amazon SES which forward the bounces/complaints to an email address.
|
@sweetppro that's quite cool! Hopefully we'll have bounce tracking support built into listmonk soon enough. |
@sweetppro Yes good stuff. I guess we could try something similar. Thank you for that :) |
Thank you :) |
|
Thanks Kailash! You the man! |
Adding should throw this error. To subscribe an existing user to new lists, the action should be "edit" ( |
We are trying to develop bounce processing for SES and it passes JSON notification via SNS to a webhook we provide. In developing this webhook, we realized there is no way to add a subscriber to the blocklist without their ID, so I am thinking to add custom headers for this type of SMTP where it would insert the subscriber ID in the message headers. Most systems that pass complaints and bounces work this way where they return message headers along with the bounce/complaint types. This allows us to parse the message header and make necessary adjustments in our database. So what are your thoughts @knadh - Would this be how you have envisioned the bounce system to work in the future? Suggesting the following items to be considered for inclusion in the message headers of an email so that the system is ready for any sort of bounce processing via API:
|
That's correct. However, the current APIs work with numerical IDs, but it's not ideal to expose these. The internal queries and APIs need be tweaked to work with both IDs and UUIDs. I'll explore this. |
@knadh how does the |
@danilobuerger sorry, missed your comment. |
I've been working on this and bounce processing will be available in the next release.
If there are any suggestions, please share. |
@knadh thanks for getting back. What I meant was: The |
|
Just wanted to mention that a general webhook for when users simply subscribe could also be a very useful addition. |
If you are using AWS SES for sending, you can use SES Configuration Sets & SNS web hooks to process bounce messages, I have it implemented in another project and it works extremely well, you also get info on the type of bounce, whether it is permanent or transient, etc. You can also get send/open etc, as well. Happy to contribute the SNS validation/subscription and parsing code for inclusion, as well as SES Configuration Set details to anyone who needs/wants it. Works with SES SMTP as well |
Yes sure, that would be helpful. Support for webhooks is already in place. SES and SendGrid webhook parsing have to be plugged in. |
SNS calls are made to a single endpoint with:
Subscribe is called when you setup the endpoint in SNS, to confirm the subscription and activate the call in sns,
In order for the SNS calls to be enabled you need to add a Configuration Set to SES and configure which notifications you want to receive, and then when you send each email, you need to add a Mail Header with the configuration set. I will send a pull request once done, and then look at documenting it all as well. |
Please don't send a PR to the |
To setup the sns web hook you need too confirm the subscription, you don't need to validate the call, but then anyone can make calls to the web hook. https://docs.aws.amazon.com/sns/latest/dg/sns-http-https-endpoint-as-subscriber.html The validation just makes sure that the incoming post request is actually from AWS SNS |
There is no need for an auth key, AWS signs all the requests you just validate the signature on the payload, putting the auth key in a query string leaves it open to abuse in my opinion. Validating the payload is pretty simple, |
Yep. Was looking for this. The SES notification docs make no mention of SNS signatures for validation. |
@cavnit that was very helpful! The signature verification would've otherwise been painful to figure out. SNS/SES confirmation and bounce processing are now fully implemented:
Took me a while to figure out as it wasn't apparent in the SES notification documentation.
|
Thats great, the only other part that might be missing is the "Configuration-Set" if you want to get send, delivered, click, open stats, as you need to set that when sending the email in the header, but it is probably better for a separate issue. |
I think the bounce branch is ready for production. I'm in the process of writing integration tests now. It supports:
@roshanjonah if you could test the |
@knadh Sorry it took so long - got caught up with work. I can't seem to get it working because I am getting this error. I ran DB upgrade too. Looks like a table is missing?
|
@roshanjonah sorry, been busy myself. There is a new bounces table and a new |
This is now merged into master 1be8c7d |
I don't understand how this works. Once again, your docs https://listmonk.app/docs/bounces/ aren't very helpful. I checked "enable bounce processing"; "bounce count =1; blocklist". I checked "Enable bounce webhooks" even though I don't understand what it does. I'm using Amazon SES so I checked "enable SES". I sent a test campaign to: But it didn't seem to register any bounces, and come to think of it, there's nowhere that "complaints" are mentioned/tracked either. "Enable bounce mailbox", don't understand it. "SMTP server's host address" so something from Amazon SES? But it's equating it to "pop.yoursite.com" which is very confusing. I know gmail has pop settings, but that's it. The docs suggest that if my "from" email has a POP3 mailbox behind it (it should; it's a gmail) then it can receive bounce e-mails. But I didn't get any bounce email from sending the campaign to bounce@simulator.amazonses.com. I looked up more bounce emails https://stackoverflow.com/questions/17699307/service-for-testing-bounced-email-handling and tested/confirmed that bounce-test@service.socketlabs.com is working as a bounce email. I sent a campaign to it; 0 bounces, and 0 emails to the "from" email notifying about bounces. EDIT: see solution a few comments down. |
@MaximilianKohler You need to setup SNS to send the bounce details, at the bottom of the https://listmonk.app/docs/bounces/ page look at the part on "External Webhooks" you will see the first entry describes how to set it up for SES |
Did not seem to work. SNS subscriptions https://user-images.githubusercontent.com/3606996/204659010-dc872421-9af4-41ca-979c-1ea841a5a3c8.jpg Verified identities https://user-images.githubusercontent.com/3606996/201532497-6536cd13-720f-44b0-8a7e-e2b390a94782.jpg Domain https://user-images.githubusercontent.com/3606996/204658897-8dfb1137-47d5-4866-a544-b7f35462ad45.jpg Moreover, I see in the AWS console (suppression list), that bounce-test@service.socketlabs.com has already been blocklisted. When I send a campaign to them it would be important to know that it was never delivered to them since they are blocklisted. Also, if Sendy can implement it automatically it should be easy for Listmonk to do so as well. For EDIT: Nope, |
Feel free to use Sendy then if it better meets your needs |
It doesn't; that's why I'm trying to test Listmonk. I only mentioned Sendy because when I went into those AWS settings I noticed that Sendy had set it up automatically. |
@MaximilianKohler ,I doubt the tone of your initial post inspires any of the volunteers on here to want to help. This software is free. If you are having trouble, ask nicely, or better yet offer to improve the documentation. The sole developer also does this in his free time. Sendy is paid software, so that dev has made some of the complicated parts easier by utilizing Amazon's api to setup all the bounce processing. |
I am indeed creating a proper guide/documentation while I spend weeks trying to set this up (I'll go post it in #120). I am frustrated because I know very well that the people creating this project could have typed out the directions in a few minutes. But they make everything so vague, so that only extremely knowledgeable people can use this, which is totally unnecessary. I see this project has dozens of contributors spending years creating it, then no one bothers to create directions simple enough for the average person to be able to follow.
In my screenshots, mine says verified (and it was verified pretty much immediately. |
Sorry @MaximilianKohler, that would be a misconception. I've no experience with SNS/SES apart from setting them up once (which I remember struggling with) for testing the feature while I was developing it. Never found the time to study and understand it and to document it properly either. If you manage to do this, please do contribute to the docs. |
Damn :( Well... you can see in my screenshots how another similar program did it automatically, and split it up into "bounces" and "complaints". Perhaps that's also why Listmonk can't distinguish between bounces and complaints? I don't know how to contribute to the docs, but I can leave details in the issues here. I found a "workaround": AWS keeps its own "suppression list": https://us-west-1.console.aws.amazon.com/ses/home?region=us-west-1#/suppression-list Only way to export it is with the command line interface (CLI): https://docs.aws.amazon.com/ses/latest/dg/sending-email-suppression-list.html#sending-email-suppression-list-view-entries - outputs in javascript. Save output to clipboard: This doesn't seem like a fully functioning workaround, because when I opt for SES bounce email notifications, I get more notifications than emails-added-to-the-bounce-list. I would suspect that those extras would be caught with Listmonk, but not sure. |
Maybe this is why it doesn't work? https://aws.amazon.com/premiumsupport/knowledge-center/ses-email-opens-clicks/
|
Solved:I found the answer on the Mautic issues mautic/mautic#7497 (comment)
I also tested cyberphen's solution of "applying the notification settings to the 'from email' as well as/instead of the domain", and that seemed to have no impact. The "from email" seems irrelevant. There are also other necessary steps I found and added to my guide. The Mautic docs are erroneous, outdated, and incomplete as well. I was able to piece together most things in the guide I made. Feel free to update your docs with it, or even simply link to it. I don't know how to mess with the docs, and I don't know if you'd like my changes. But the Mautic docs shouldn't be the only/main reference there given how flawed they are. Now that I've gotten most things to work, Listmonk is actually quite a good program. There are things that are even better than some paid alternatives. Thank you very much for making it free and open source. The only disappointment is the fact that likely hundreds of people went through the same steps I did and not a single one bothered to leave instructions for others. I initially immediately dismissed Listmonk as a viable option after looking at https://listmonk.app/#download and the linked docs. I think the stuff that's there right now is just gibberish to the vast majority of people. But with the right directions it should be relatively easy to set up for most people. Also, from what I've been able to determine, Amazon SES only logs hard bounces in the suppression list. Soft bounces and domain errors are only logged via email notifications and webhooks. So it's probably not a great idea to rely solely on SES's suppression list. https://repost.aws/questions/QUFi5N0DVBRyqAioWQTXfuSA/se-ss-suppression-list-misses-many-bounces-that-otherwise-get-emailed-to-me-via-email-feedback-forwarding-do-i-need-to-worry-about-these-it-would-be-nice-if-there-was-an-option-to-catch-these-extras Once Listmonk separates soft bounces to its own customizable category, that would be a nice improvement. |
@MaximilianKohler could you make pull request with your instuctions to |
Sorry, I have no idea how. I took a look and it seems too complicated for me. If it was like editing a wiki I could do it, but I'm no coder. I'll keep updating the guide-comment I made in the other thread with whatever I learn. |
Cool. Done. Maybe if that's accepted I'll try more. I was thinking another option would be to enable the wiki and create an "installation guide" page, and I could paste my guide in there. |
yep, cool, looks great |
Thanks for the PR. It's merged. |
I see a lot of you guys have Listmonk implemented in a production env. I was wondering how you guys process the soft and hard bounces and also the complaints.
The text was updated successfully, but these errors were encountered: