Subscription Email and Blog Post hyperlinks get blocked

I have the following site set up: https://tetractysresearch.com/ with ghost selfhosted.

I have identified two similar issues with the emails that get sent by mailgun:

First: when someone subscribes using one of the buttons on the site, they receive their confirmation email as expected:

The explicit link (Tetractys Research…) which I can copy paste in my browser works fine and completes the subscription to the best of my knowledge

The link embedded in the signin button from the email leads to this error:


I notice it starts with email.m as opposed to the regular email.

A very similar issue comes when trying to open the link in the email of a publication shared via email. The publication in email displays correctly:


However the hyperlinked :" [View in browser](http://email.m.tetractysresearch.com/c/eJxskEFq7D…" also starts with email.m and has the same error.

Here are some of the DNS records relevant to the email setup in my DigitalOcean droplet:

Given my thorough lack of knowledge, please guide me as to the additional information you need me to provide in order to resolve this error.
Appreciate all the help in advance! Ghost is looking like a great platform so far!

I’d start by quadruple-checking in the mailgun dashboard that it’s expecting those exact urls for the MX, CNAME, etc. I have in my head that the defaults it recommends have ‘mg’, not ‘m’, and while I think you can change it, if you’ve got a mismatch from what ghost is set to and what mailgun is expecting, it’s gonna break.

Thanks for the quick reply!

Here is the config around emails which is indeed using “m.” and not “mg.”

  "mail": {
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "auth": {
        "user": "noreply@m.tetractysresearch.com",
        "pass": "ca8e1819ae98b9b2f922dd7a1d7d0937-2b755df8-8c3d5447"
      }
    }
  },

In mailgun it is also setup that way:
image

In the setting from the “m.” domain:
seems to be tying out relative to digital ocean and the code snippet above?

So seems to be consistent across the three platforms. If you think changing the m to mg is the best first step, how do you recommend I start changing it first or that does not matter?

as long as everything is consistent, it should be OK!

1 Like

In Ghost official doc, the value of “mail.auth.user” typically starts with “postmaster”, while yours starts with “noreply” and this is not a valid auth user name. Maybe you can check your auth user name again.

1 Like

Thanks for the help.

Here is the update thus far:

Terminal Updated saved and ghost restarted:

  "mail": {
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.mailgun.org",
      "port": 465,
      "secure": true,
      "auth": {
        "user": "postmaster@mg.tetractysresearch.com",
        "pass": "1234567890"
      }
    }
  },

Ghost GUI:
updated to “mg.”
image

And the DNS are connected to Digital Ocean with mg.

Mailgun

DigitalOcean

The issue persists:
I just ran a test on a new post and somehow received an email from noreply@ even though that should not be a defined variable at this point given I switched to postmaster as @Raki recommended

The hyperlink provides the same error as before these updates:

Thanks for the help!

Did you enable “click track” in mailgun? It will scan your email and rewrite link.

2 Likes

image