550 Verification Failed ´No Such User' (Callback verification)

AI-generated summary

The discussion revolves around a “550 Verification Failed ‘No Such User’” error encountered by dexpositoromero while trying to send emails via Mailgun in a Discourse installation on a subdomain. The error occurred despite proper DNS and MX record setup.

Mailgun support suggested several solutions, including turning off sender address verification, adding a specific header to the message, sending from a subdomain, changing MX records, or creating a catch-all.

itsbhanusharma suggested disabling Cloudflare on the MX domain/subdomain, which wasn’t the solution. dexpositoromero later found the solution by setting the email routing for the subdomain to “Remote Mail Exchanger” in cPanel.

Additionally, dexpositoromero mentioned the lack of HTTPS on the forum due to difficulties with setting up Let’s Encrypt with Cloudflare. itsbhanusharma suggested disabling Cloudflare optimization for the forum subdomain to potentially generate an SSL certificate.

Hi folks,
I am facing some mail issues with new discourse installation in subdomain. I have gone through the troubleshooting and still have that problem. Essentially, emails from discourse via MailGun do not reach email addresses in my hosting.
Some details of installation environment:

  • Hosted in Vultr
  • Subdomain in standard hosting
  • Using Cloudflare
  • Using Mailgun

Other details:

  • Emails from Mailgun-Discourse do reach other services (like google mail), and even mail-tester.com without problem.
  • Other type of emails reach the recipient (i.e. normal email sent by my GMail address).
  • DNS and MX records in Cloudflare set and updated in Mailgun

It is not really important that the emails reach those emails accounts in my hosting (although I wanted to use one of them as admin) but I cam concerned that it might happen also with other self-hosted email addresses.

Header from Failure email:

{
    "severity": "permanent",
    "tags": [],
    "storage": {
        "url": "https://sw.api.mailgun.net/v3/domains/[subdomain here]messages/eyJwIjpmYWxzZSwiayI6IjgwYzAzNzQ2LTN.........",
        "key": "eyJwIjp...."
    },
    "delivery-status": {
        "mx-host": "dc-94c828295f73.[domain here[",
        "attempt-no": 1,
        "description": "",
        "session-seconds": 0.5889058113098145,
        "code": 550,
        "message": "Verification failed for <bounce+f45d38.b55c5c-[username]=[domain]@[subdomain]>\nNo Such User Here\nSender verify failed"
    },
    "recipient-domain": "[domain here]",
    "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@[subdomain]",
        "sending-ip": "184.173.153.194",
        "targets": "[user]@[domain]"
    },
    "message": {
        "headers": {
            "to": "[recipient user]@[recipient-domain]",
            "message-id": "e438348c-9414-48e8-8af3-25df2174d5f7@[discourse subdomain]",
            "from": "Discourse <noreply@[discourse subdomain]>",
            "subject": "Email Deliverability Test"
        },
        "attachments": [],
        "size": 7127
    },
    "recipient": "[recipient user]@[recipient-domain]",
    "event": "failed"
}

Quoting ticket reply from Mailgun:

The error that you are seeing is the result of sender address verification, and you can read more about it in the following link: Callback verification - Wikipedia. Essentially, this means the recipient domain is performing a check to make sure the sending address is valid.

The following options will help you resolve this error:

  1. Turn off sender address verification (this is server-side).
  2. Add “x-mailgun-native-send: true” to the header of your message to turn off sender address rewriting.
  3. Send from a subdomain of your domain.
  4. Change the MX records to point to Mailgun instead. ( Warning : do not do this unless you have a Route setup to route back to the internal server.)
  5. Create a catch_all with the service where you receive email so that, when the recipient server checks, verification it will pass.

Any one has any suggestions on this?

Thanks a lot!

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.