# Migrating users with invalid emails

**URL:** https://meta.discourse.org/t/migrating-users-with-invalid-emails/61302
**Category:** Support
**Created:** [April 20, 2017, 5:49am UTC](https://meta.discourse.org/t/migrating-users-with-invalid-emails/61302 "2017-04-20T05:49:33Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![juli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/juli/32/121043_2.png) [@juli](https://meta.discourse.org/u/juli)
#### Post date: [April 20, 2017, 5:49am UTC](https://meta.discourse.org/t/migrating-users-with-invalid-emails/61302/1 "2017-04-20T05:49:33Z")

</div>

Hello everyone, I think this is my first post here. Thank you for such a great product and community. I’m not sure if this belongs to the support category so feel free to reorganize my topic as you deem necessary.

I’m planning to migrate my sites from XenForo to Discourse and in my first migration test I have found some problems with my database. Before XenForo I migrated from vBulletin and before that, from UBBThreads. I’m not sure what forum software allowed this but it appears that I’m full of users with invalid email addresses that Discourse won’t import for obvious reasons.

I was wondering what are the consequences of somehow force Discourse to accept those invalid email addresses. I really don’t want to lose those users although they’re probably inactive and I was wondering if there’s something that might break different from, well, emailing to those users with invalid email addresses.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 20, 2017, 6:11am UTC](https://meta.discourse.org/t/migrating-users-with-invalid-emails/61302/2 "2017-04-20T06:11:32Z")

</div>

As long as you don’t mark them active, that is, they must “validate” their broken email address, there should be no problem. These users must come across as **deactivated.**

If they get marked active, it will be bad, because Discourse will try to mail them.

These users won’t be able to recover their old accounts because there’s no way to send an email password reset; they will need to contact staff themselves.

---

<div class="post-metadata">

### Author: ![JagWaugh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagwaugh/32/69335_2.png) [@JagWaugh](https://meta.discourse.org/u/JagWaugh)
#### Post date: [April 20, 2017, 6:28am UTC](https://meta.discourse.org/t/migrating-users-with-invalid-emails/61302/3 "2017-04-20T06:28:48Z")

</div>

> [@codinghorror](#):
>
> If they get marked active, it will be bad, because Discourse will try to mail them.

If you have a lot of them, then it won’t just be bad… it will be **very** bad. It doesn’t take many mails to nonexistent users before that provider blacklists you, meaning that your users with existent mailboxes at that provider don’t get any discourse emails either.

Get this right before you go live, it’s important.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 20, 2017, 2:32pm UTC](https://meta.discourse.org/t/migrating-users-with-invalid-emails/61302/4 "2017-04-20T14:32:34Z")

</div>

You can modify the script to make their email be something like `USERNAME@mail.invalid` and make sure that they are marked as validated so they do not get sent mail. The `.invalid` address will help if somehow they do get emailed.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 15, 2022, 9:05pm UTC](https://meta.discourse.org/t/migrating-users-with-invalid-emails/61302/7 "2022-10-15T21:05:03Z")

</div>


