# Turning off email for a user

**URL:** https://meta.discourse.org/t/turning-off-email-for-a-user/323913
**Category:** Support
**Tags:** email
**Created:** [August 29, 2024, 5:19am UTC](https://meta.discourse.org/t/turning-off-email-for-a-user/323913 "2024-08-29T05:19:38Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Andro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andro/32/173721_2.png) [@Andro](https://meta.discourse.org/u/Andro)
#### Post date: [August 29, 2024, 5:19am UTC](https://meta.discourse.org/t/turning-off-email-for-a-user/323913/1 "2024-08-29T05:19:38Z")

</div>

I have some users with defunct or undeliverable email addresses. I turn off notifications in their preference but mail to them still goes out. Am I going crazy? Or does Discourse keep trying to send failed emails forever? What cold be going on?

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [August 29, 2024, 5:27am UTC](https://meta.discourse.org/t/turning-off-email-for-a-user/323913/2 "2024-08-29T05:27:03Z")

</div>

Could you provide a bit more info? Which emails is it sending?

And it may make more sense to just deactivate their accounts if they’re not able to log in anyway.

---

<div class="post-metadata">

### Author: ![Andro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andro/32/173721_2.png) [@Andro](https://meta.discourse.org/u/Andro)
#### Post date: [August 29, 2024, 11:44am UTC](https://meta.discourse.org/t/turning-off-email-for-a-user/323913/3 "2024-08-29T11:44:00Z")

</div>

Any email. And yes, I have taken to deactivating the accounts. Mystery not solved - without reading the source code I suspect Discourse keeps retrying to send for some time. But that is only a guess.

---

<div class="post-metadata">

### Author: ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)
#### Post date: [August 29, 2024, 1:31pm UTC](https://meta.discourse.org/t/turning-off-email-for-a-user/323913/4 "2024-08-29T13:31:00Z")

</div>

Are they actually the same email being retried or are they similar emails, e.g. an email for the first reply in a topic, then later an email for a second reply?

Where are you seeing the additional emails? Discourse logs, your email provider logs or somewhere else?  
If it’s your email provider, depending on the delivery failure, that might be perfectly normal - temporary failures will be retried periodically for an amount of time before eventually bouncing, how many times and over what period will be entirely down to configuration by your email provider.

Do you have bounces set up correctly to be delivered to Discourse, either by having bounce emails reaching mail-receiver or using webhooks?  
Ordinarily if Discourse is notified of these failures, the bounce score for a user will build and past a certain threshold (`bounce_score_threshold` setting), Discourse will stop trying to send emails to that user.

---

<div class="post-metadata">

### Author: ![David\_Ghost](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@David\_Ghost](https://meta.discourse.org/u/David_Ghost)
#### Post date: [August 29, 2024, 2:07pm UTC](https://meta.discourse.org/t/turning-off-email-for-a-user/323913/5 "2024-08-29T14:07:01Z")

</div>

I got the same issue in the past and i have just changed these 2 options (+summary email)to “never” in their profile, in the tab “emails”.

 ![This image is a screenshot of a computer interface displaying an email with the subject "Me enviar o meu recibo do vencimento". (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/a/b/b/abbc6a2ab0c327d77cceead278f655902f0e2f18.jpeg)

---

<div class="post-metadata">

### Author: ![Andro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andro/32/173721_2.png) [@Andro](https://meta.discourse.org/u/Andro)
#### Post date: [September 1, 2024, 4:48pm UTC](https://meta.discourse.org/t/turning-off-email-for-a-user/323913/6 "2024-09-01T16:48:23Z")

</div>

> [@Simon\_Manning](#):
>
> Do you have bounces set up correctly to be delivered to Discourse, either by having bounce emails reaching mail-receiver or using webhooks?

Probably not.

Do you have any pointers on necessary setup for that, or tutorials, etc? I am using a local Postfix instance for sending mail from Discourse and the mail-receiver app for receiving.

---

<div class="post-metadata">

### Author: ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)
#### Post date: [September 1, 2024, 5:25pm UTC](https://meta.discourse.org/t/turning-off-email-for-a-user/323913/7 "2024-09-01T17:25:19Z")

</div>

Assuming your postfix configuration isn’t doing something to alter bounce delivery, I believe having `DISCOURSE_NOTIFICATION_EMAIL` in `app.yml` using the same domain that reaches mail-receiver should be all it needs.

E.g. if your `mail-receiver.yml` config uses `MAIL_DOMAIN: discourse.example.com` (and your DNS records result in email to that domain being delivered to mail-receiver), `DISCOURSE_NOTIFICATION_EMAIL` should look something like `whatever@discourse.example.com`

---

<div class="post-metadata">

### Author: ![Andro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andro/32/173721_2.png) [@Andro](https://meta.discourse.org/u/Andro)
#### Post date: [September 2, 2024, 1:38am UTC](https://meta.discourse.org/t/turning-off-email-for-a-user/323913/8 "2024-09-02T01:38:35Z")

</div>

@Simon_Manning Does that put them into the Bounced email log in Discourse though?

Before I changed to Postfix I used to see bounces there, now nothing.
