Imported mbox file mails all have user 'system'

Hi All

We are trying to move to discourse but in order to do so I must be able to import all old chain mails we have aggregated in the past 2 years.

I am following the instructions and while the import works, there are two problematic issues:

  1. The order of the topics is latest on top (which I know how to fix with rake)
  2. The user is not imported, not staged, rather the posting user is system

This is problematic as we would not know whom to contact on one of the older answes given to a question.

I am running the latest version (v2.2.0.beta8). The following is my settings.yml file for import

data_dir: /shared/import/data
split_regex: "^From.*.+@tikalk.+"
default_trust_level: 1
prefer_html: true
staged: true
index_only: false
group_messages_by_subject: true

In my mbox files I have the following From sections:

From: Yoav Nordmann <>

Any ideas ?

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 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?


Yo answer your question, I am importing from a gmail account and all mails are in 1 single mbox file.

From what you wrote I am starting to think I used the wrong separator.
There is another from separator:

From 1621016496672657672@xxx Thu Dec 27 14:43:19 +0000 2018

But this one does not have out company mail: rather “xxx” so I thought I need to use the one with out company mail in it.

I will try with the following regex as separator regex: "^From .+@xxx.+"

I will update on my progress.

Thanks so much for the support
Not only did it fix the user issue, but it also order the topics in the correct order.


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