# Bounce score not updated

**URL:** https://meta.discourse.org/t/bounce-score-not-updated/44694
**Category:** Support
**Created:** [May 23, 2016, 7:18pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694 "2016-05-23T19:18:48Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![pixelsoffreedom](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@pixelsoffreedom](https://meta.discourse.org/u/pixelsoffreedom)
#### Post date: [May 23, 2016, 7:18pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/1 "2016-05-23T19:18:48Z")

</div>

Hi,

I’ve followed your guide on migrating to [mailgun](http://blog.discourse.org/2016/03/switching-your-discourse-from-mandrill-to-mailgun/) but I’m having some issues with the bounce score - it’s not getting updated when email sending fails.  
I can see the bounces in mailgun, but when checking the email in my discourse instance, the bounce score is 0.

Are there any extra settings I might have missed for propagating the responses back to the forum?

Thanks!

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [May 23, 2016, 8:14pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/2 "2016-05-23T20:14:59Z")

</div>

That’s because mailgun is overwriting our VERP and is the only one to receive the bounce notification. The only solution is to add support for their [bounces webhook](https://documentation.mailgun.com/user_manual.html#tracking-bounces).

---

<div class="post-metadata">

### Author: ![pixelsoffreedom](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@pixelsoffreedom](https://meta.discourse.org/u/pixelsoffreedom)
#### Post date: [May 23, 2016, 8:18pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/3 "2016-05-23T20:18:18Z")

</div>

@zogstrip I see.  
Quickly checking the docs I’ve seen this

> You can specify a webhook URL in the ‘Webhooks’ tab of your Control Panel. If you do, every time a message experiences a hard bounce, your URL will be invoked with the following parameters

Would you have an example of an url I should provide as an webhook?

Much appreciated!

\*edit: Just realised that “The only solution is to add support for their bounces webhook” means that there is no url yet 😃. Should I raise a feature request?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [May 23, 2016, 9:42pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/4 "2016-05-23T21:42:16Z")

</div>

> [@pixelsoffreedom](#):
>
> Should I raise a feature request?

I’m doing some research to figure out how easy (or hard) it would be to do it for the most popular mail services out there 😉

---

<div class="post-metadata">

### Author: ![pixelsoffreedom](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@pixelsoffreedom](https://meta.discourse.org/u/pixelsoffreedom)
#### Post date: [May 30, 2016, 10:29pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/5 "2016-05-30T22:29:30Z")

</div>

@zogstrip any news? 🙂

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [May 30, 2016, 10:30pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/6 "2016-05-30T22:30:47Z")

</div>

Forgot to update this topic, but already added support for mailgun

[https://github.com/discourse/discourse/commit/116efffdaad04ca4357fffa827ef236f93454378](https://github.com/discourse/discourse/commit/116efffdaad04ca4357fffa827ef236f93454378)

Others are coming 😉

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [June 1, 2016, 8:02pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/7 "2016-06-01T20:02:54Z")

</div>

Sendgrid is now in 😉

[https://github.com/discourse/discourse/commit/9704603fab07052c06b3f8e47b13ea7fa7a9ed1e](https://github.com/discourse/discourse/commit/9704603fab07052c06b3f8e47b13ea7fa7a9ed1e)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [June 6, 2016, 5:48pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/8 "2016-06-06T17:48:11Z")

</div>

Mailjet is now in 📪

[https://github.com/discourse/discourse/commit/fe595f1653d4441cf4504615c76a04cbcb6c00e9](https://github.com/discourse/discourse/commit/fe595f1653d4441cf4504615c76a04cbcb6c00e9)

---

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [May 8, 2018, 6:54am UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/9 "2018-05-08T06:54:55Z")

</div>

I’ve set up bounce handling through VERP on Amazon SES. Bounces are detected properly, but users’ bounce scores don’t get updated past ‘2’. Here’s an example of a user who has had numerous bounces:

 ![0%202018-05-08%2008-49-47](https://global.discourse-cdn.com/meta/original/3X/6/0/609c0b957a317598705a2e90933338fe0eaadc05.png)

I’m using the system default bounce settings:

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/4/8455f7c734ded252d2c090de77c0cba6c35e0775.png)

I’d expect him to have a bounce score of at least 10 (he has far more bounces), yet in his profile he is set to ‘2’:

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/9/b947af1548dce391d57b1f0edcedd53948237c89.png)

Do I misunderstand how this works, or did I misconfigure something? My expectation was that Discourse would stop emailing him after a few bounces.

On a related question, I’m not entirely clear what the date in the bounce score field means: I suppose it’s his ‘reset date’?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 8, 2018, 10:45am UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/10 "2018-05-08T10:45:59Z")

</div>

Maybe @zogstrip could comment.

---

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [May 8, 2018, 5:59pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/12 "2018-05-08T17:59:31Z")

</div>

Related: I’m also still trying to understand when a user will be deactivated:

> [@What does 'revoke email' action mean in Logs?](https://meta.discourse.org/t/what-does-revoke-email-action-mean-in-logs/57096/6):
>
> I’m a bit confused about how this works; as I understand it, with the default settings a user will not receive any new emails when he reaches a score of 4 - and this score will be reset after 30 days. So in which scenario can a user reach the bounce score of 30? Or is this a separate counter that keeps track of this users’s lifetime bounce score?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [May 9, 2018, 1:31pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/13 "2018-05-09T13:31:27Z")

</div>

We only update the bounce score [once per day](https://github.com/discourse/discourse/blob/3483c7bc587c619134c557c68350e371dc44a837/lib/email/receiver.rb#L203-L206) to prevent people with a full mailbox to be automatically deactivated when they subscribe to forum with a lot of activity.

I might tone that down to **once per hour** instead unless someone else can think of a reason not to?

---

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [May 9, 2018, 1:35pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/14 "2018-05-09T13:35:03Z")

</div>

Ah, interesting! However, I checked the current count of user sundialsvc4 (the one in my screenshot), and his bounce score is now 4 - still lower than what I expected.

Does ‘update once per day’ also mean ‘we count a max of 1 bounce per day’? In that case the score of ‘4’ would make sense. Still, it leaves me a little worried about my IP ranking - some users already have 30 bounces on their name.

So perhaps running this hourly IS a better option if that’s the case.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [May 9, 2018, 1:35pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/15 "2018-05-09T13:35:41Z")

</div>

> [@bartv](#):
>
> Does ‘update once per day’ also mean ‘we count a max of 1 bounce per day’?

That’s exactly what it means 😉

---

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [May 9, 2018, 1:37pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/16 "2018-05-09T13:37:05Z")

</div>

Thanks 🙂 I guess you guys process a ton of mail too - has this daily process ever led to issues for you?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [May 9, 2018, 2:43pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/17 "2018-05-09T14:43:52Z")

</div>

After looking at our logs, I don’t think it makes that much sense to only update the bounce score once a day.

So I removed that throttling 📧

[https://github.com/discourse/discourse/commit/6b1ff0edd394b74ab6da8beef6bb64ef9c3be80a](https://github.com/discourse/discourse/commit/6b1ff0edd394b74ab6da8beef6bb64ef9c3be80a)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 9, 2018, 8:08pm UTC](https://meta.discourse.org/t/bounce-score-not-updated/44694/18 "2018-05-09T20:08:51Z")

</div>


