# Unexplained Email::Receiver::InvalidPost errors

**URL:** https://meta.discourse.org/t/unexplained-email-invalidpost-errors/377793
**Category:** Bug
**Created:** [August 7, 2025, 8:31pm UTC](https://meta.discourse.org/t/unexplained-email-invalidpost-errors/377793 "2025-08-07T20:31:32Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [August 8, 2025, 6:00pm UTC](https://meta.discourse.org/t/unexplained-email-invalidpost-errors/377793/4 "2025-08-08T18:00:45Z")

</div>

> [@lavamind](#):
>
> or in another instance, it’s a bunch of gibberish characters

Did it come from Exchange?

Sometimes Microsoft Exchange will send out garbage if it’s misconfigured to think it’s talking to… I’m not sure - another Exchange server? Something else within its own infrastructure?

You can look at the raw mail from the Discourse console with e.g.:

```plaintext
mid = 'message-id from the log'
puts IncomingEmail.find_by(message_id: mid).raw

```

This shows the raw email that Discourse received. For example, this message body I just pulled out of our incoming rejection list really is garbage:

```plaintext
This is a multi-part message in MIME format.
--=====003_Dragon855807841081_=====
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: base64

7bgir+m+vzzIDCLE0mDmZrfIXvvmXjY=

--=====003_Dragon855807841081_=====
Content-Type: text/html;
 charset=utf-8
Content-Transfer-Encoding: base64

LP/0L4tqmfZizO0DCDDE10uOzMZqzSHDjq04SLPaBjibLVHz+V94m1M45NDN
55aM8SMIf9XY4EFjP9CCFz+ojfmJqmubaz+bjrzmubw+bjWTiGSuLg==

--=====003_Dragon855807841081_=====--

```

as the parts don’t decode to valid text.

---

_[View the full topic](https://meta.discourse.org/t/unexplained-email-invalidpost-errors/377793)._
