# Mailing list import: posts out of order

**URL:** https://meta.discourse.org/t/mailing-list-import-posts-out-of-order/95078
**Category:** Support
**Created:** [August 19, 2018, 2:37am UTC](https://meta.discourse.org/t/mailing-list-import-posts-out-of-order/95078 "2018-08-19T02:37:36Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [August 23, 2018, 7:57am UTC](https://meta.discourse.org/t/mailing-list-import-posts-out-of-order/95078/3 "2018-08-23T07:57:38Z")

</div>

Thanks for the mbox file. It looks like the sorting never really worked. It must have been luck :shamrock: that all the mbox files I imported in the past had the correct order. :man_shrugging:

Anyway, I fixed it in [Improve mbox import script · discourse/discourse@ac743da · GitHub](https://github.com/discourse/discourse/commit/ac743dab104d76d508a5a930c8d45f085c144ab2)

Please bear in mind that it’s still possible for some messages to be _appear_ to be in the wrong order. That’s because the post date reflects the value of the email’s `Date` header. It’s possible that the email client used the wrong date when sending an email. The import script determines the primary sort order by looking at the `In-Reply-To` and `References` header in order to prevent replies from showing up before any email it referenced.

---

_[View the full topic](https://meta.discourse.org/t/mailing-list-import-posts-out-of-order/95078)._
