550 検証失敗「該当ユーザーなし」(コールバック検証)

こんにちは皆さん、

新しいサブドメインへの Discourse インストールでメール関連の問題に直面しています。トラブルシューティングを試みましたが、まだ問題が解決していません。端的に言うと、MailGun を経由した Discourse からのメールが、私のホスティング環境内のメールアドレスに届きません。

インストール環境の詳細:

  • Vultr でホスト
  • 標準的なホスティング内のサブドメイン
  • Cloudflare を使用
  • Mailgun を使用

その他の詳細:

  • Mailgun-Discourse からのメールは、他のサービス(Gmail など)や mail-tester.com には問題なく届きます。
  • 他の種類のメール(私の Gmail アドレスから送信された通常のメールなど)は受信者に届いています。
  • Cloudflare 内の DNS および MX レコードは設定され、Mailgun で更新されています。

私のホスティング内のこれらのメールアドレスにメールが届くことはそれほど重要ではありません(管理用としてそのうちの 1 つを使いたかったのですが)、他のセルフホストされたメールアドレスでも同様のことが起こるのではないかと懸念しています。

失敗メールのヘッダー:

{
    "severity": "permanent",
    "tags": [],
    "storage": {
        "url": "https://sw.api.mailgun.net/v3/domains/[サブドメイン]messages/eyJwIjpmYWxzZSwiayI6IjgwYzAzNzQ2LTN.........",
        "key": "eyJwIjp...."
    },
    "delivery-status": {
        "mx-host": "dc-94c828295f73.[ドメイン]",
        "attempt-no": 1,
        "description": "",
        "session-seconds": 0.5889058113098145,
        "code": 550,
        "message": "Verification failed for <bounce+f45d38.b55c5c-[ユーザー名]=[ドメイン]@[サブドメイン]>\nNo Such User Here\nSender verify failed"
    },
    "recipient-domain": "[ドメイン]",
    "id": "DSLvcNXnTEKYl7gsFOGkDg",
    "campaigns": [],
    "reason": "generic",
    "user-variables": {},
    "flags": {
        "is-routed": false,
        "is-authenticated": true,
        "is-system-test": false,
        "is-test-mode": false
    },
    "log-level": "error",
    "timestamp": 1535055760.1404,
    "envelope": {
        "transport": "smtp",
        "sender": "noreply@[サブドメイン]",
        "sending-ip": "184.173.153.194",
        "targets": "[ユーザー]@[ドメイン]"
    },
    "message": {
        "headers": {
            "to": "[受信者ユーザー]@[受信ドメイン]",
            "message-id": "e438348c-9414-48e8-8af3-25df2174d5f7@[Discourse サブドメイン]",
            "from": "Discourse <noreply@[Discourse サブドメイン]>",
            "subject": "Email Deliverability Test"
        },
        "attachments": [],
        "size": 7127
    },
    "recipient": "[受信者ユーザー]@[受信ドメイン]",
    "event": "failed"
}

Mailgun のチケット返信からの引用:

表示されているエラーは、送信者アドレス検証の結果です。詳細については以下のリンクをご覧ください:http://en.wikipedia.org/wiki/Callback_verification。つまり、受信ドメインが送信アドレスが有効かどうかを確認していることを意味します。

このエラーを解決するための以下のオプションがあります:

  1. 送信者アドレス検証を無効化する(これはサーバーサイドの設定です)。
  2. メッセージのヘッダーに “x-mailgun-native-send: true” を追加して、送信者アドレスの書き換えを無効化する。
  3. ドメインのサブドメインから送信する。
  4. MX レコードを Mailgun を指すように変更する。(警告:内部サーバーへルーティングする設定がない限り、この操作は行わないでください。)
  5. メールを受け取るサービスで catch_all を作成し、受信サーバーが検証を行う際に通過できるようにする。

これについて何かご提案はありますか?

よろしくお願いいたします!

Daniel

I see that you have enabled cloudflare on your mx records as well!

Can you try again by disabling cloudflare on your mx domain/subdomain?

I Noticed your forum runs on http not https is there a purpose for that?

Right… So it looks like it is fixed now…
Just for future reference from someone having this problem, I just went to cPanel > Email Routing, and for the subdomain I am using for Discourse (and thus the subdomain Mailgun generates the postmaster/no-reply emails) I chose “Remote Mail Exchanger” and click on “Change”
Seems to work now with all emails… :roll_eyes:

Hi Bhanu,
Thanks for your reply. See below, looks like I managed to sort it out.
Re: SSL, because Let’sEncrypt+Cloudflare was a nightmare to set up for the main site, I am using Cloudflare’s shared certificated for the main site. Not sure how to manage it with Cloudflare + Ubuntu, hence why no HTTPS. If you have any links I can look at, that’d be amazing!
Kind Regards,
Daniel

Just disable cloudflare optimization for your forum subdomain and it should in theory be able to generate ssl for you.