Unexplained Email::Receiver::InvalidPost errors

Running that through Email::Receiver.new(rawmessage).select_body returns:

=> ["", "", 2]

so I’m pretty confident what’s happening here is that Discourse is incorrectly selecting an empty plain/text portion as the message body, probably this one:

--Sig_/gizYC_1dGsAzUHvksdaMIe2
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit


which would be an invalid post.

We’ll need to do a bit of investigation on this and probably use it as a test case.