# Import: incorrect user assignment

**URL:** https://meta.discourse.org/t/import-incorrect-user-assignment/139219
**Category:** Support
**Created:** [January 20, 2020, 7:24pm UTC](https://meta.discourse.org/t/import-incorrect-user-assignment/139219 "2020-01-20T19:24:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ruperty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ruperty/32/164033_2.png) [@ruperty](https://meta.discourse.org/u/ruperty)
#### Post date: [January 20, 2020, 7:24pm UTC](https://meta.discourse.org/t/import-incorrect-user-assignment/139219/1 "2020-01-20T19:24:48Z")

</div>

On importing mbox files, originally from a mailing list, I see that about 3500, out of 66000, are being incorrectly assigned to a user.

Here is the first, and two other, lines from the header:

> From [csgnet@lists.illinois.edu](mailto:csgnet@lists.illinois.edu) Fri Dec 12 12:55:30 2014  
> From: “Dag Smith” ([user@pctresources.com](mailto:user@pctresources.com) via csgnet Mailing List) [csgnet@lists.illinois.edu](mailto:csgnet@lists.illinois.edu)  
> X-Original-From: Dag Smith [user@pctresources.com](mailto:user@pctresources.com)

Is the import script only using the first line, as that is the email that is being used for the user rather than the correct one, [user@pctresources.com](mailto:user@pctresources.com)?

It should really be using “X-Original-From”, do we have any control over that?

---

<div class="post-metadata">

### Author: ![ruperty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ruperty/32/164033_2.png) [@ruperty](https://meta.discourse.org/u/ruperty)
#### Post date: [January 25, 2020, 10:18am UTC](https://meta.discourse.org/t/import-incorrect-user-assignment/139219/2 "2020-01-25T10:18:19Z")

</div>

Any suggestions for this? Help! 🥴

---

<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: [February 3, 2020, 12:47pm UTC](https://meta.discourse.org/t/import-incorrect-user-assignment/139219/3 "2020-02-03T12:47:37Z")

</div>

Neither `Original-From` nor `X-Original-From` are currently supported by the import script.

You could modify the import script (feel free to create a pull request) or use some regex magic on your source files to remove the `From:` header and rename the `X-Original-From:` header to `From:`

---

<div class="post-metadata">

### Author: ![ruperty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ruperty/32/164033_2.png) [@ruperty](https://meta.discourse.org/u/ruperty)
#### Post date: [February 3, 2020, 8:37pm UTC](https://meta.discourse.org/t/import-incorrect-user-assignment/139219/4 "2020-02-03T20:37:55Z")

</div>

Thanks, I filtered all the files removing the incorrect email in the “From:” line.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [December 26, 2023, 10:17pm UTC](https://meta.discourse.org/t/import-incorrect-user-assignment/139219/5 "2023-12-26T22:17:03Z")

</div>


