# Unsubscribe links on emails

**URL:** https://meta.discourse.org/t/unsubscribe-links-on-emails/79940
**Category:** Feature
**Created:** [February 6, 2018, 7:07pm UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940 "2018-02-06T19:07:49Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![skodali](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@skodali](https://meta.discourse.org/u/skodali)
#### Post date: [February 6, 2018, 7:07pm UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/1 "2018-02-06T19:07:49Z")

</div>

I am using discourse as a mailing list and when a topic is created via email an email notification is sent to all the users. I also enabled the unsubscribe via email footer setting. When a user replies to the first message there are now two unsubscribe links in the message one for the original author and the other for the user.  
So the user can now unsubscribe the original author from getting any updates if they chose to. I am not sure if anyone has experienced this issue or am I missing something?

---

<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: [February 6, 2018, 8:31pm UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/2 "2018-02-06T20:31:32Z")

</div>

> [@skodali](#):
>
> I also enabled the unsubscribe via email footer setting

So.. disable that setting? Problem solved.

---

<div class="post-metadata">

### Author: ![skodali](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@skodali](https://meta.discourse.org/u/skodali)
#### Post date: [February 6, 2018, 8:52pm UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/3 "2018-02-06T20:52:56Z")

</div>

I want the users to be able to unsubscribe using the link. Disabling it is not an option for us.

---

<div class="post-metadata">

### Author: ![awlogan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awlogan/32/62208_2.png) [@awlogan](https://meta.discourse.org/u/awlogan)
#### Post date: [February 6, 2018, 9:27pm UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/4 "2018-02-06T21:27:00Z")

</div>

I’m looking at a mail thread on my site, same setting enabled.I see a thread with the latest response, and 4 responses below that from previous interactions. I’m only seeing a single unsubscribe footer, I went through all the mails to be sure. Are they responding and cutting the old message into the new message maybe?

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [February 7, 2018, 9:06am UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/5 "2018-02-07T09:06:57Z")

</div>

Sounds like a problem with the [email reply trimmer](https://github.com/discourse/email_reply_trimmer/commits/master) not being able to recognize the quoted part.

Maybe @zogstrip can have a look if you sent him the raw source of the email in question?

As a second line of defense, maybe Discourse could always censor unsubscribe tokens in posts received via email? The email reply trimmer is just based on heuristics, it shouldn’t be trusted for security… 🤔

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 7, 2018, 11:03am UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/6 "2018-02-07T11:03:30Z")

</div>

+1 to @fefrei pm a raw copy of the problem email to @zogstrip

The second line of defense idea is interesting but with Gmail almost everyone top posted, so it just works

I wonder if this is a non English site?

---

<div class="post-metadata">

### Author: ![skodali](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@skodali](https://meta.discourse.org/u/skodali)
#### Post date: [February 7, 2018, 2:18pm UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/7 "2018-02-07T14:18:29Z")

</div>

I sent the raw email version to @zogstrip .  
Ours is an english website based in United States.  
I agree with @fefrei , email parser should definitely trim the unsubscribe links on replies.

---

<div class="post-metadata">

### Author: ![skodali](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@skodali](https://meta.discourse.org/u/skodali)
#### Post date: [February 7, 2018, 2:19pm UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/8 "2018-02-07T14:19:09Z")

</div>

No, we are using this as a regular email thread.

---

<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: [February 7, 2018, 11:02pm UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/9 "2018-02-07T23:02:58Z")

</div>

The email @skodali PMed me had some elided content which it shouldn’t have, so I fixed it

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

---

<div class="post-metadata">

### Author: ![skodali](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@skodali](https://meta.discourse.org/u/skodali)
#### Post date: [February 8, 2018, 12:34am UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/10 "2018-02-08T00:34:15Z")

</div>

Will this fix be included in the next release?

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [February 8, 2018, 6:27am UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/11 "2018-02-08T06:27:16Z")

</div>

If you are using default installation or “test-passed” branch then upgrade will include all recent updates. And you can do upgrade anytime between the #releases.

---

<div class="post-metadata">

### Author: ![skodali](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@skodali](https://meta.discourse.org/u/skodali)
#### Post date: [February 22, 2018, 8:06pm UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/12 "2018-02-22T20:06:08Z")

</div>

We are still experiencing the issue even with the new fix. Anyone else having the same issue?

---

<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: [March 2, 2018, 12:24am UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/13 "2018-03-02T00:24:57Z")

</div>

Do you have the site setting “`incoming email prefer html`” enabled? If not, you should try it.

---

<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: [March 2, 2018, 1:56am UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/14 "2018-03-02T01:56:27Z")

</div>

This is the new default now, @gerhard made the change about a week ago.

---

<div class="post-metadata">

### Author: ![skodali](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@skodali](https://meta.discourse.org/u/skodali)
#### Post date: [March 5, 2018, 2:56pm UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/15 "2018-03-05T14:56:39Z")

</div>

Yes, we have the option enabled.

---

<div class="post-metadata">

### Author: ![tkrunning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tkrunning/32/119481_2.png) [@tkrunning](https://meta.discourse.org/u/tkrunning)
#### Post date: [June 6, 2018, 4:03pm UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/16 "2018-06-06T16:03:34Z")

</div>

I just enabled incoming emails on my forum and I’m having similar issues (the full quoted email is included in the post, including unsubscribe link, etc).

I’ve tried toggling the prefer html setting, but that didn’t help. I’ll send the raw email to @zogstrip, perhaps there’s still something not quite with the email parser?

---

<div class="post-metadata">

### Author: ![ValdikSS](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/valdikss/32/157221_2.png) [@ValdikSS](https://meta.discourse.org/u/ValdikSS)
#### Post date: [October 10, 2019, 2:00am UTC](https://meta.discourse.org/t/unsubscribe-links-on-emails/79940/17 "2019-10-10T02:00:34Z")

</div>

I’m experiencing this problem with Discourse 2.4.0.beta5. The quotation part of the message is correctly parsed and is hidden by default, but it includes unsubscription link for both HTML and plain text letters.

Tried to reply from Mozilla Thunderbird and gmail web interface.  
Sending raw messages to @zogstrip.
