# An Outlook-E-Mails angehängte Dateien werden bei Versendung an Discourse entfernt und nicht zugestellt

**URL:** https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703
**Category:** Support
**Tags:** unsupported-install
**Created:** [4. Oktober 2018 um 09:34 UTC](https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703 "2018-10-04T09:34:40Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Adam\_Glebowicz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adam_glebowicz/32/341486_2.png) [@Adam\_Glebowicz](https://meta.discourse.org/u/Adam_Glebowicz)
#### Post date: [4. Oktober 2018 um 09:34 UTC](https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703/1 "2018-10-04T09:34:40Z")

</div>

Hello,

I’m posting this here as I could not find any discussion touching my exact issue.  
We’re using the email-in functionality heavily in our Discourse instance.  
All email attachments are delivered properly to new topics in Discourse except the Outlook email files.  
The file gets stripped somewhere on the way and doesn’t arrive to Discourse.  
The email attachments we send have a “.msg” extension and when they arrive to the inbox (from which Discourse fetches emails) they are converted to the “.eml” extension.

I checked all related Discourse settings:

- attachment content type blacklist - I cleaned all values
- attachment filename blacklist - I cleaned all values
- authorized extensions - it’s set to “\*”

I can see the same files are allowed to be attached to posts when added from Discourse GUI - they are only blocked via email. When sent from email, those attachments don’t even get added to Discourse’s uploads table in DB - they’re stripped somewhere on the way. I checked the email & upload processing files, like:

- lib/email/receiver.rb
- lib/email/processor.rb
- lib/email.rb
- lib/upload\_creator.rb
- lib/validators/upload\_validator.rb  
but I don’t see any place where this stripping could occur in any hardcoded way.

Is this a known bug/feature?  
Do you know which file/method could be the culprit for this behavior?

Regards,  
Adam

---

<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: [4. Oktober 2018 um 10:28 UTC](https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703/2 "2018-10-04T10:28:45Z")

</div>

Not sure, any ideas @zogstrip?

---

<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: [4. Oktober 2018 um 10:49 UTC](https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703/3 "2018-10-04T10:49:50Z")

</div>

Interesting 🤔

Could you send one of those email to [regis.hanol@discourse.org](mailto:regis.hanol@discourse.org) so that I can have a look?

---

<div class="post-metadata">

### Author: ![Adam\_Glebowicz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adam_glebowicz/32/341486_2.png) [@Adam\_Glebowicz](https://meta.discourse.org/u/Adam_Glebowicz)
#### Post date: [4. Oktober 2018 um 11:52 UTC](https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703/4 "2018-10-04T11:52:28Z")

</div>

Sure, just did it this minute.

Regards,  
Adam

---

<div class="post-metadata">

### Author: ![Adam\_Glebowicz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adam_glebowicz/32/341486_2.png) [@Adam\_Glebowicz](https://meta.discourse.org/u/Adam_Glebowicz)
#### Post date: [11. Oktober 2018 um 13:47 UTC](https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703/5 "2018-10-11T13:47:34Z")

</div>

Hello,

Any update on this one?

Regards,  
Adam

---

<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. Oktober 2018 um 10:38 UTC](https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703/6 "2018-10-12T10:38:41Z")

</div>

Sorry, hadn’t had time to check.

But, we’ve [added an email](https://github.com/discourse/discourse/commit/361ad7ed2baa2e36dd6cf7c6580e70dee8634f7a) that will tell you why an attachment was rejected.

Can you upgrade to latest and test again?

---

<div class="post-metadata">

### Author: ![Adam\_Glebowicz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adam_glebowicz/32/341486_2.png) [@Adam\_Glebowicz](https://meta.discourse.org/u/Adam_Glebowicz)
#### Post date: [15. Oktober 2018 um 07:50 UTC](https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703/8 "2018-10-15T07:50:17Z")

</div>

Hello,

I can see that change is included in the latest 2.2.0 beta3, but I’m running a Bitnami stack of Discourse.  
It’s currently at 2.1.2 the latest and it’s going to take a while before it’s updated to this version.

Can you try emailing any of the .eml attachments to the newest beta version on your side and forward me the error you’ll get?

Regards,  
Adam

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [15. Oktober 2018 um 08:04 UTC](https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703/9 "2018-10-15T08:04:48Z")

</div>

We don’t really support bitnami installs for this reason.

You’re best off looking at migrating your data to a fresh build using the [official install](https://meta.discourse.org/t/142537?silent=true) guide:

[https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md)

---

<div class="post-metadata">

### Author: ![Adam\_Glebowicz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adam_glebowicz/32/341486_2.png) [@Adam\_Glebowicz](https://meta.discourse.org/u/Adam_Glebowicz)
#### Post date: [15. Oktober 2018 um 08:08 UTC](https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703/10 "2018-10-15T08:08:10Z")

</div>

Hello,

I understand your standpoint, but the root cause is not in the Bitnami stack, but in Discourse attachment handling somewhere 🙂  
I just wanted to know at least an error message you get, now that you support attachment error messages in the newest build.

Regards,  
Adam

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [15. Oktober 2018 um 08:09 UTC](https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703/11 "2018-10-15T08:09:01Z")

</div>

Sure, but we don’t support old versions of discourse. If you want to test this feature it’s not for the team to do for you.

---

<div class="post-metadata">

### Author: ![maja](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maja/32/129533_2.png) [@maja](https://meta.discourse.org/u/maja)
#### Post date: [5. November 2018 um 10:07 UTC](https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703/12 "2018-11-05T10:07:24Z")

</div>

I have added a fix for this, .eml files are not stripped from emails anymore

[https://github.com/discourse/discourse/commit/1ac3e5473a5c7193138fedd507e5d2ae63d07d21](https://github.com/discourse/discourse/commit/1ac3e5473a5c7193138fedd507e5d2ae63d07d21)

---

<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: [5. November 2018 um 19:25 UTC](https://meta.discourse.org/t/outlook-email-files-attached-to-emails-sent-to-discourse-are-stripped-and-not-delivered/98703/13 "2018-11-05T19:25:37Z")

</div>


