Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Ghost
  3. Subscriber sign up mail issue for Ghost 3.0 instances on a sub domain

Subscriber sign up mail issue for Ghost 3.0 instances on a sub domain

Scheduled Pinned Locked Moved Solved Ghost
ghost
6 Posts 3 Posters 1.4k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tkd
    wrote on last edited by girish
    #1

    Seems to be an issue with a Ghost 3.0 instance sending subscriber magic link emails to users when signing up on a Ghost instance on a Cloudron sub domain. Ghost assumes the domain it should be sending from should include the sub domain e.g. noreply@demo.mydomain.com, when the blog is at https://demo.mydomain.com.

    The sign up form returns "Please enter a valid email address!" but the logs show the following:

    "Failed to send email. Reason: Mail from command failed - 550 Authenticated user demo.app@mydomain.com cannot send mail as noreply@demo.mydomain.com."

    Having Email Masquerading enabled for mydomain.com doesn't make any difference. Sending a test email from the Ghost UI works fine as the email comes from demo.app@mydomain.com and I'm guessing doesn't encounter the authentication error.

    The Ghost UI doesn't offer the ability to alter the domain part of the sending email address. Is this something that can be modified within the Ghost package for updating / new installations? Also what would be the best temporary solution?

    1 Reply Last reply
    0
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @tkd Maybe this is a bug in the packaging. Ideally, the Ghost app should know out of the box from which domain it's sending emails from. Let me investigate and get back on this.

      1 Reply Last reply
      0
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #3

        I am able to reproduce the above. It seems that the demo.mydomain.com part is hardcoded at https://github.com/TryGhost/Ghost-Admin/blob/18605d9d05d09d8f0ca6e918cd49b9703ed050c4/app/templates/components/gh-members-lab-setting.hbs#L184 which is in turn computed from the location where ghost is installed https://github.com/TryGhost/Ghost-Admin/blob/a5c69cc86d5cfefa702400fc7b03454f37f6d2d5/app/services/config.js#L62

        I am not sure what the fix is. Do you know why Ghost is not using the mail settings it already has in it's config? (Sending normal member invitations works as expected).

        1 Reply Last reply
        0
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by girish
          #4

          @tkd Sorry. forgot to give the workaround. I have given explanation of the workaround below.

          Workaround:

          • Add a Domain called demo.mydomain.com in the Cloudron Domains view. This can have the same DNS settings as mydomain.com.
          • Now go to Email view and enable masquerading for demo.mydomain.com.
          • Then change the domain of your existing app installed at demo.mydomain.com i.e in configure UI -> Location and then in the drop down select demo.mydomain.com and leave the location field empty. Effectively, the app remains at demo.mydomain.com but is using the settings of the Cloudron's demo.mydomain.com

          Explanation:
          On Cloudron, we don't allow apps to send email with arbitrary addresses across domains. So, if an app has to send emails as demo.mydomain.com then it has to be installed under that domain.

          Side effect:
          Now your invite emails will also go from demo.app@demo.mydomain.com. Hope this is OK. BTW, you can change this "demo.app" in the Email section of the app's configure UI.

          marcusquinnM 1 Reply Last reply
          2
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #5

            A late note but in recent releases you can now have the email set to a different domain from where ghost is hosted.

            1 Reply Last reply
            1
            • girishG girish

              @tkd Sorry. forgot to give the workaround. I have given explanation of the workaround below.

              Workaround:

              • Add a Domain called demo.mydomain.com in the Cloudron Domains view. This can have the same DNS settings as mydomain.com.
              • Now go to Email view and enable masquerading for demo.mydomain.com.
              • Then change the domain of your existing app installed at demo.mydomain.com i.e in configure UI -> Location and then in the drop down select demo.mydomain.com and leave the location field empty. Effectively, the app remains at demo.mydomain.com but is using the settings of the Cloudron's demo.mydomain.com

              Explanation:
              On Cloudron, we don't allow apps to send email with arbitrary addresses across domains. So, if an app has to send emails as demo.mydomain.com then it has to be installed under that domain.

              Side effect:
              Now your invite emails will also go from demo.app@demo.mydomain.com. Hope this is OK. BTW, you can change this "demo.app" in the Email section of the app's configure UI.

              marcusquinnM Offline
              marcusquinnM Offline
              marcusquinn
              wrote on last edited by
              #6

              @girish Just tested this workaround and it works!

              (I set DNS to Manual to save creating another API key and DNS records since the sub-domain is only for development).

              There seems to be some typos in the instructions above though between demo.domain.com and domain.com that might be worth fixing to help anyone else searching for a solution on the same too.

              Web Design https://www.evergreen.je
              Development https://brandlight.org
              Life https://marcusquinn.com

              1 Reply Last reply
              1
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search