Last line of post submitted by email missing

One of my users has reported that in several cases the last line or two of his posts,
done via email, are missing.

The post were well below the character limit and there are no censored words, any ideas what might be causing this? I don’t see anything in the logs about it.

Looking at the raw data in the incoming_emails table, the missing text was definitely in the email as received, it just didn’t make it into the formatted post. This is a reply, not the start of a new topic.

I’ve seen this happen when the parser couldn’t decide if the last lines were a signature. Did those replies have any funky typography like that? ---?

1 Like

None that I saw, but the ‘raw’ field in the incoming_emails table is a bit strange, all of the words are crammed together without spaces or punctuation.

Here’s a brief excerpt:


What’s missing is everything starting with the word ‘Hell’. The formatted text has the period after ‘neighbor’ but nothing after that.

I think I’ve figured out what happened but not necessarily how to prevent it from happening again.

I capture incoming email before saving it in the mailbox that is read by the Discourse container, and have the original message in question from this user.

The email has a text/plain segment and a text/html segment.

The final (and missing) line from his message is in the text/plain segment but not in the text/html segment, and it is the latter that Discourse uses for creating a post.

So whatever is happening to cause lines get dropped, it looks like it is happening before those emails
get to my server.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.