# ユーザーメールドメインが多すぎて機能しないため、Mailgunドメインが無効になりました：どうすればよいですか？

**URL:** https://meta.discourse.org/t/too-many-user-emails-domains-not-working-lead-to-mailgun-domain-disabled-what-to-do/167780
**Category:** Support
**Tags:** email
**Created:** [2020 年 10 月 20 日午後 7:46 UTC](https://meta.discourse.org/t/too-many-user-emails-domains-not-working-lead-to-mailgun-domain-disabled-what-to-do/167780 "2020-10-20T19:46:59Z")
**Posts on this page:** 1
**Showing post:** 4

<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: [2020 年 10 月 20 日午後 8:20 UTC](https://meta.discourse.org/t/too-many-user-emails-domains-not-working-lead-to-mailgun-domain-disabled-what-to-do/167780/4 "2020-10-20T20:20:06Z")

</div>

ただし、`bademail.domain` のような無数のメールアドレスがある場合、以下のような処理を行うのがよいでしょう。

```
rake posts:remap['bademail.domain', 'no-email.invalid']

```

詳しくは [Replace a string in all posts](https://meta.discourse.org/t/replace-a-string-in-all-posts/48729) をご覧ください。これにより、Discourse がそれらのメールアドレスに送信しないように設定されます。もう一つの有効な解決策は、以下のようになります。

```plaintext
bad = User.find_by_email     
# 該当するユーザーをすべて取得する検索条件を記述
bad.update_all(active: false)

```

既知の無効なメールアドレスを持つすべてのユーザーを無効化します。最初の部分の具体的な実装方法はすぐに思い浮かびませんが、それほど難しくないはずです。

---

_[View the full topic](https://meta.discourse.org/t/too-many-user-emails-domains-not-working-lead-to-mailgun-domain-disabled-what-to-do/167780)._
