# Email signature not being stripped out when user write new topic or reply to a topic

**URL:** https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389
**Category:** Support
**Created:** [11 Outubro , 2016 08:50 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389 "2016-10-11T08:50:31Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Manfred\_Bayer-Lemerz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manfred_bayer-lemerz/32/62721_2.png) [@Manfred\_Bayer-Lemerz](https://meta.discourse.org/u/Manfred_Bayer-Lemerz)
#### Post date: [11 Outubro , 2016 08:50 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/1 "2016-10-11T08:50:31Z")

</div>

Hallo

When sending a new post or reply to a post via mail the email signature was not  
stripped out.

The following was posted as a new topic:

```
Mal sehen was hier mit der Signatur passiert!

-- 
Mit lieben Grüßen

Manfred Bayer-Lemerz

```

Is there a setting to turn the stripping out off or on?

I have the original email headers/source available for anyone who wants to look at this bug more closely.

thanks

Manfred

---

<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: [11 Outubro , 2016 09:09 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/2 "2016-10-11T09:09:26Z")

</div>

Signature stripping is done automatically. Since there’s no standard, it’s hard to get it right for all the billions signature formats out there. Can you PM me the raw email so that I can have a look?

---

<div class="post-metadata">

### Author: ![Manfred\_Bayer-Lemerz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manfred_bayer-lemerz/32/62721_2.png) [@Manfred\_Bayer-Lemerz](https://meta.discourse.org/u/Manfred_Bayer-Lemerz)
#### Post date: [11 Outubro , 2016 09:32 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/3 "2016-10-11T09:32:04Z")

</div>

Thanks for the fast answer! Will send you the File right away!

---

<div class="post-metadata">

### Author: ![wesochuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wesochuck/32/108706_2.png) [@wesochuck](https://meta.discourse.org/u/wesochuck)
#### Post date: [11 Outubro , 2016 23:06 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/4 "2016-10-11T23:06:21Z")

</div>

> [@zogstrip](#):
>
> Since there’s no standard, it’s hard to get it right for all the billions signature formats out there.

For our group it would be helpful to understand what the _preferred_ signature format is. For example, we could let folks know that anything after ten dashes ---------- would be parsed as a signature. We could then be in contact with our most difficult signature _offenders_ (those that include images as part of their signature) and ask them to prepend their signature line with ten dashes. I realize this method wouldn’t work for everyone, but it would be very helpful for our smaller group (300 members).

Or possibly include something in the Admin that allowed us to specify our own local signature formats that would be stripped from incoming emails.

---

<div class="post-metadata">

### Author: ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)
#### Post date: [11 Outubro , 2016 23:12 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/5 "2016-10-11T23:12:53Z")

</div>

Usenet signature cut lines are standardized. How many people get it right (follow suit) in email is another matter. The quoted text in the first post does appear to be a standard Usenet cut line: hyphen-hyphen-space.

---

<div class="post-metadata">

### Author: ![Silvanus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/silvanus/32/62831_2.png) [@Silvanus](https://meta.discourse.org/u/Silvanus)
#### Post date: [12 Outubro , 2016 10:54 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/6 "2016-10-12T10:54:41Z")

</div>

When I was young, I was told that the standard is two lines, space and linebreak.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [12 Outubro , 2016 13:54 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/7 "2016-10-12T13:54:48Z")

</div>

A solution that I’ve mused about is that there couple be a use setting that included the text to remove. People could then paste their sig in there and have it removed when they posted.

Its still rather fiddly,but easier than machine learning.

---

<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: [12 Outubro , 2016 17:59 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/8 "2016-10-12T17:59:20Z")

</div>

I upgraded our [`email_reply_trimmer`](https://github.com/discourse/email_reply_trimmer/commit/53bddc4d88ce7fff0af3d0a9bbc2410ed9eab575) library and pushed it to master. Can you give it a try?

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

---

<div class="post-metadata">

### Author: ![dirk.jahnke](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@dirk.jahnke](https://meta.discourse.org/u/dirk.jahnke)
#### Post date: [15 Outubro , 2016 09:34 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/9 "2016-10-15T09:34:05Z")

</div>

Not sure, if this behaviour really belongs to this change: Emails are not accepted because of a invalid main body or a body, that is too short. In fact, the body is long enough according to the rules (min. 20 characters) and I cannot see a reason, why it should not be accepted. Maybe we strip out too much of the content?

I can provide you the email that matters.

Dirk

---

<div class="post-metadata">

### Author: ![sjmscott](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sjmscott/32/198290_2.png) [@sjmscott](https://meta.discourse.org/u/sjmscott)
#### Post date: [24 Abril , 2017 19:48 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/10 "2017-04-24T19:48:29Z")

</div>

I have a few users who are willing to update their email signatures, but I’m confused on what I should tell them.

What signature protocols does Discourse accept?

What is the signal to for discourse to cut the signature?

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [28 Maio , 2019 11:47 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/11 "2019-05-28T11:47:36Z")

</div>



---

<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: [29 Maio , 2019 00:37 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/12 "2019-05-29T00:37:18Z")

</div>

I believe @gerhard is in the best position to advise here.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [29 Maio , 2019 09:56 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/13 "2019-05-29T09:56:59Z")

</div>

Discourse uses HTML emails by default and it automatically detects and strips email signatures of the most popular email clients. So, this should work out of the box as long as your users send HTML emails and use their email client to insert signatures.

For plain text emails it’s always a good idea to start signatures with the de facto standard of two dashes and a space.

```plaintext
-- 
signature

```

---

<div class="post-metadata">

### Author: ![Cozdabuch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cozdabuch/32/139120_2.png) [@Cozdabuch](https://meta.discourse.org/u/Cozdabuch)
#### Post date: [13 Junho , 2019 21:55 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/14 "2019-06-13T21:55:23Z")

</div>

Is there any way to manually add signatures from my users to my board’s email trimmer library?

I only have 20 users, that’s all it’ll ever be. So it’s easy to manage.

Ideas?

---

<div class="post-metadata">

### Author: ![Paul\_King](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paul_king/32/165426_2.png) [@Paul\_King](https://meta.discourse.org/u/Paul_King)
#### Post date: [23 Janeiro , 2020 02:25 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/15 "2020-01-23T02:25:28Z")

</div>

Oi @gerhard, por mais que eu tente, não consigo fazer o recorte automático de assinaturas funcionar. Os e-mails testados simplesmente têm assinaturas padrão do tipo Microsoft Outlook com imagens e/ou texto adicionados no final de qualquer novo e-mail enviado.

Isso provavelmente é apenas uma configuração errada da minha parte?

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [23 Janeiro , 2020 02:27 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/16 "2020-01-23T02:27:23Z")

</div>

Você tem a opção ‘sempre mostrar conteúdo recortado’ marcada?

---

<div class="post-metadata">

### Author: ![Paul\_King](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paul_king/32/165426_2.png) [@Paul\_King](https://meta.discourse.org/u/Paul_King)
#### Post date: [23 Janeiro , 2020 03:07 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/17 "2020-01-23T03:07:07Z")

</div>

Sim, está marcado. Há alguma outra configuração necessária?

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [23 Janeiro , 2020 03:22 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/18 "2020-01-23T03:22:59Z")

</div>

Deve estar **desmarcado** se você não quiser mostrar o conteúdo cortado.

---

<div class="post-metadata">

### Author: ![Paul\_King](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paul_king/32/165426_2.png) [@Paul\_King](https://meta.discourse.org/u/Paul_King)
#### Post date: [23 Janeiro , 2020 03:32 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/19 "2020-01-23T03:32:36Z")

</div>

Hmm, essa é a configuração com a qual comecei, e ela também não estava removendo as assinaturas para mim.

Será que só a primeira postagem por e-mail é que é cortada, e não as postagens subsequentes?

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [23 Janeiro , 2020 03:36 UTC](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389/20 "2020-01-23T03:36:21Z")

</div>

Isso acontece em todos os e-mails recebidos? O cortador de assinatura de e-mail funciona bem na maioria dos meus, mas alguns aleatórios passam, junto com um persistente enviado de `X-Mailer: Microsoft Outlook 16.0`.

> [@Paul\_King](#):
>
> Será que é apenas a primeira postagem por e-mail, e não as postagens subsequentes que são cortadas?

Não, todas as postagens por e-mail passam pelo tratamento do cortador.

[Next page](https://meta.discourse.org/t/email-signature-not-being-stripped-out-when-user-write-new-topic-or-reply-to-a-topic/51389.md?page=2)
