The user YoavNordmann is experiencing issues importing mbox files into Discourse. The imported emails have a posting user of system instead of the actual user who sent the email. gerhard suggests that the issue is with the split_regex in the settings.yml file, which is matching the actual From header of emails instead of the separator between emails. YoavNordmann confirms that they are importing from a Gmail account and all mails are in a single mbox file. After adjusting the split_regex to "^From .+@xxx.+", YoavNordmann reports that the issue is fixed, and the topics are also ordered correctly.
Well, that’s a problem. Your regex will match the actual From header of emails. Are you sure that your separator between emails contains a colon? Usually it looks like From foo@example.com Sat Aug 18 19:23:56 2018. Note that there is no colon after the “From”, because that should be reserved for the email header.
If there is a colon in your separator, you might need to find another way to cleanly separate the emails in the mbox file. You are importing from mbox, right? Not just a bunch of emails where every email is stored in its own file?