How To / Tutorials 2 min read

Verify sending domain inside Mandrill without email hosting

Mandrill has enforced upon us that the only way to verify a sending-domain (domain used to send emails from) is by getting an email sent by them on an email of the sending-domain in use. So, if you use example.org or something.example.org to send emails, you can now only verify your sending-domain, by receiving an email from them on anyemail@example.org or anyemail@something.example.org in which you have to click on a verification link to validate your ownership of the domain.

Now that’s not ideal. Add a TXT record is enough for verification purpose, and that’s essentially the step that proves the ownership of domain through this step only but this is how it is.

The only issue with this approach is that one must have email hosting or an email inbox setup to receive emails on that domain. If you already have a working email on the sending-domain, you don’t need to read the rest of the post. Simply, enter the working email for verification and get it over with. But if you don’t, then instead of setting up email hosting somewhere for just verification purpose, you can utilize this trick I discovered. Its quick enough & free alternative to do so by simply using Inbound emails feature in Mandrill accounts.

Here is how to do it:
———————

Add your domain under “Inbound domains”

screen-shot-2016-11-23-at-12-51-01-am

Now add MX record for your sending domain as per the instructions

screen-shot-2016-11-23-at-12-51-37-am

Add those MX records in your DNS and then validate those records are reflecting by clicking on “Test DNS settings”.

Once confirmed, simply setup a route for that domain, by clicking the arrow on the right of “Test DNS settings” link.

screen-shot-2016-11-23-at-12-55-48-am

Configure webhook POST URL to a URL you obtained on https://requestb.in

screen-shot-2016-11-23-at-12-56-07-am

screen-shot-2016-11-23-at-12-57-20-am

Now go to verification of send domains, enter the email address you configured and wait for the email to come at your https://requestb.in/XXXXXXX URL.

screen-shot-2016-11-23-at-12-57-58-am

Find the link, copy and paste it in the browser.

And you are done!

14 comments

  1. Faisal Ashfaq

    Thanks so much!!

    Worked like a charm.. 🙂

  2. Matt Fiocca

    This is clever.

  3. Ajeng Wulandari

    Thank you so much 😀

  4. Jonathan Mason

    works perfectly, thanks for such an elegant solution!

  5. Nathan Erickson

    This appears to no longer work because mandrill will not send email to an unverified domain. Regardless if mandrill itself owns the mx records for that domain.

    1. Pablo Romano
      replying to Nathan Erickson

      Do you find some other way to do this? I own the domain but don’t have a email client in there (just a web page)…

      1. Nathan Erickson
        replying to Pablo Romano

        Yes I ended up finding a way. Turns out that once you have the MX record assigned to mandrill you can look at the mandrill API logs for a bounced incoming mail due to an “unsigned” error, which is mandrills way of telling you the domain is unverified. But in the API logs contain the contents of the email, you can extract the verification link from that, paste it into your browser and you are verified.

        1. Pablo Romano
          replying to Nathan Erickson

          Nice! That’s really clever! Thanks

          1. Nathan Erickson
            replying to Helmi

            They should show rejections, double check if you have the mandrill MX records set correctly for your domain.

    2. Ashfame
      replying to Nathan Erickson

      Sorry to learn that. It was crappy to begin with. This was for a client. I use Mailgun, maybe consider that?

  6. Pablo Romano

    I dont have the “routes” options in the domains section, only “delete”. There is some other way to configure the webhook?

  7. Technology Points

    Nice and informative post ashfame, Best information! Thanks for sharing the wonderful article.

Leave a comment

Your email stays private. Required fields are marked