# Remover anexos de e-mails recebidos não notifica o remetente

**URL:** https://meta.discourse.org/t/stripping-incoming-email-attachments-doesnt-notify-sender/21216
**Category:** Feature
**Created:** [Outubro 16, 2014, 9:10pm UTC](https://meta.discourse.org/t/stripping-incoming-email-attachments-doesnt-notify-sender/21216 "2014-10-16T21:10:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [Outubro 16, 2014, 9:10pm UTC](https://meta.discourse.org/t/stripping-incoming-email-attachments-doesnt-notify-sender/21216/1 "2014-10-16T21:10:22Z")

</div>

Continuing the discussion from [Incoming emails with attachments are not processed](https://meta.discourse.org/t/incoming-emails-with-attachments-are-not-processed/14032/4):

> [@neil](#):
>
> I pushed a fix for this today. The attachment is still being thrown away, but the email will cause a post or topic to be created. Give it a try.

It appears that **when an attachment is stripped off** (e.g., because it’s not on the approved file type list) **the user is never notified** that the attachment did not go through.

This causes users to think/assume we got their attachment when in fact it never got included in their post.

Stripping attachments should notify the user (similar to a failed post due to address mismatch or other problems) that the attachment was not included because the file type is not allowed. (Or too big, etc.)

---

<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: [Junho 20, 2015, 6:01am UTC](https://meta.discourse.org/t/stripping-incoming-email-attachments-doesnt-notify-sender/21216/21 "2015-06-20T06:01:01Z")

</div>

Back on topic, cleared out a ton of noise in this topic.

There are a _lot_ of email clients that include little BS “attachments” with every email they send that contain signatures, calendar files, and other meaningless errata.

If we sent a bounce email on every one, for every “unknown” attachment that was emailed in, that’d be extremely noisy.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [Junho 22, 2015, 3:13pm UTC](https://meta.discourse.org/t/stripping-incoming-email-attachments-doesnt-notify-sender/21216/22 "2015-06-22T15:13:39Z")

</div>

Any actual numbers here? Calendar files are usually only sent when someone wants to communicate about an event. Email signatures perhaps but those are usually only for HTML formatted emails right?

I have seen these things but not convinced it’s really a problem here.

One could also only notify when removing a “legit” type such as accepted whitelist matches.

---

<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: [Junho 28, 2015, 11:37am UTC](https://meta.discourse.org/t/stripping-incoming-email-attachments-doesnt-notify-sender/21216/23 "2015-06-28T11:37:15Z")

</div>

All E-Mails I send have a [smime.p7s](https://en.wikipedia.org/wiki/S/MIME) attachment.

If dropping attachments notifies the sender, this needs a whitelist of filenames where dropping is harmless.

---

<div class="post-metadata">

### Author: ![jeffbyrnes](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jeffbyrnes/32/121097_2.png) [@jeffbyrnes](https://meta.discourse.org/u/jeffbyrnes)
#### Post date: [Abril 1, 2025, 4:17pm UTC](https://meta.discourse.org/t/stripping-incoming-email-attachments-doesnt-notify-sender/21216/24 "2025-04-01T16:17:32Z")

</div>

Desculpe pelo necro-post, mas estou com dificuldades para que e-mails recebidos com anexos sejam aceitos e processados pelo Discourse.

Para sua informação, o link [Incoming emails with attachments are not processed](https://meta.discourse.org/t/incoming-emails-with-attachments-are-not-processed/14032/4) está quebrado, então não consigo consultar esse Tópico.

Estou usando o Mailgun e tenho um Grupo do Discourse configurado para receber Mensagens por meio de um endereço de e-mail. O Mailgun faz uma chamada HTTP para minha instalação do Discourse para entregar esses e-mails como Mensagens, mas essas chamadas HTTP falham com um `406 Not acceptable`, que é descrito oficialmente como:

> O recurso é válido, mas não pode ser fornecido no formato especificado nos cabeçalhos `Accept` da solicitação.

Os logs do Discourse não revelam nada sobre esses erros `HTTP 406` 😕

Um erro menos comum é o Mailgun relatando um `413 Request Entity Too Large`, o que eu entendo, mas não tenho certeza de como resolver no lado do Discourse. Como configuro o Discourse para aceitar isso?
