Stripping incoming email attachments doesn't notify sender

Continuing the discussion from Incoming emails with attachments are not processed:

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.)

4 Likes

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.

2 Likes

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.

2 Likes

All E-Mails I send have a smime.p7s attachment.

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

1 Like

Apologies for the necro-post, but I’m struggling with incoming emails with attachments not being accepted & processed by Discourse.

FYI, the Incoming emails with attachments are not processed is broken, so I can’t look back at that Topic.

I’m using Mailgun, and have a Discourse Group set up to receive Messages via an email address. Mailgun makes an HTTP call to my Discourse install to deliver these emails as Messages, but these HTTP calls fail with a 406 Not acceptable, which is officially described as:

The resource is valid, but cannot be provided in a format specified in the Accept headers in the request.

The Discourse logs reveal nothing about these HTTP 406 errors :confused:

A less common error is Mailgun reporting a 413 Request Entity Too Large, which I understand, but I’m not sure how to solve on the Discourse side. How do I configure Discourse to accept these?