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


(Daniel) #1

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: http://en.wikipedia.org/wiki/Callback_verification. 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


(Bhanu Sharma) #2

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?


(Daniel) #3

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:


(Daniel) #4

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


(Bhanu Sharma) #5

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


(Jeff Atwood) #6