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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Has anyone got email working with subdomains?

    Support
    mail
    5
    10
    515
    Loading More Posts
    • 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.
    • marcusquinn
      marcusquinn last edited by girish

      I'm trying to get email working on example.name@xyz.example.com.

      I have the MX record for xyz pointing to my.example.com, priority 10.

      I have a User setup - all the usual stuff - except email is bouncing back with:

      Action: failed
      Status: 5.0.0
      Diagnostic-Code: smtp; 550 No such address
      

      Am I missing something or was this not an anticipated setup to support?

      We're not here for a long time - but we are here for a good time :)
      Jersey/UK
      Work & Ecommerce Advice: https://brandlight.org
      Personal & Software Tips: https://marcusquinn.com

      martinkbs 1 Reply Last reply Reply Quote 0
      • martinkbs
        martinkbs @marcusquinn last edited by

        @marcusquinn With these DNS records it should work without problem:

        Hostname: xyz.example.com
        Record type: MX
        Expected value: 10 my.example.com.
        
        Hostname: cloudron-xxxxxx._domainkey.xyz
        Record type: TXT
        Expected value: v=DKIM1; t=s; p=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        
        Hostname: xyz.example.com
        Record type: TXT
        Expected value: v=spf1 a:my.example.com ~all
        
        Hostname: _dmarc.xyz
        Record type: TXT
        Expected value: v=DMARC1; p=reject; pct=100
        
        
        marcusquinn 1 Reply Last reply Reply Quote 3
        • marcusquinn
          marcusquinn @martinkbs last edited by

          @martinkbs OK, they are all correct in Cloudflare, so the auto-DNS setup seems to have worked.

          Although, the Cloudron Email Status Check green-ticks are all showing, so I didn't bother to check, but it seems the auto-DNS isn't taking account of the subdomain and is using @ Hostnames. @girish that would seem to be a bug to me, but I don't think causing my undeliverable bouncing issues.

          I think this might require support detectives on the server 🤷

          We're not here for a long time - but we are here for a good time :)
          Jersey/UK
          Work & Ecommerce Advice: https://brandlight.org
          Personal & Software Tips: https://marcusquinn.com

          timconsidine 1 Reply Last reply Reply Quote 0
          • timconsidine
            timconsidine App Dev @marcusquinn last edited by

            @marcusquinn I did something similar with email for a sub-domain, but in addition to the DNS I actually added the sub-domain as a domain in the Cloudron domains.
            Works fine. But maybe it is the wrong or a redundant step.

            martinkbs girish 2 Replies Last reply Reply Quote 3
            • martinkbs
              martinkbs @timconsidine last edited by

              @timconsidine No, it is not a redundant step. Otherwise, Cloudron will not interpret the subdomain as something "different" from the main domain. Additionally, it is required for Cloudron to generate the credentials for the DKIM registry.

              It is a step that I have skipped, because @marcusquinn was only asking for DNS records, but it is a necessary step.

              I put a functional example to make it clearer: Installation of Mautic on the marketing.domain.es subdomain

              First step: register the subdomain marketin.domain.es in Cloudron. In this case, the Manual configuration has been chosen due to organization restrictions when using Cloudflare.

              Captura de pantalla 2021-09-18 a las 10.13.05.png

              This will generate, within the Cloudron Email configuration, the following records for the subdomain:

              Captura de pantalla 2021-09-18 a las 10.16.07.png

              With the information from the Cloudron records, we must go to the DNS panel of our domain and configure the records as follows:

              Hostname: marketing.domain.es
              Record type: A
              Expected value: XXX.XXX.XXX.XXX /* your IP server */
              
              Hostname: marketing.domain.es
              Record type: MX
              Expected value: 10 my.example.com.
              
              Hostname: cloudron-xxxxxx._domainkey.marketing
              Record type: TXT
              Expected value: v=DKIM1; t=s; p=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
              
              Hostname: marketing.domain.es
              Record type: TXT
              Expected value: v=spf1 a:my.example.com ~all
              
              Hostname: _dmarc.marketing
              Record type: TXT
              Expected value: v=DMARC1; p=reject; pct=100
              

              Once the DNS records of the domain have been propagated, we can install the app within the Cloudron

              Now, in the Email section of the app, we can configure the email address @marketing.domain.es for sending emails from the app

              Captura de pantalla 2021-09-18 a las 10.29.39.png

              And in the Email section of the marketing.domain.es subdomain we can configure the email accounts we need:

              Captura de pantalla 2021-09-18 a las 10.31.40.png

              In this case, the addresses:

              • no-reply@marketing.domain.es
              • bounces@marketing.domain.es

              send and receive emails normally and Mautic works without problems in the marketing.domain.es subdomain

              Captura de pantalla 2021-09-18 a las 10.41.03.png

              Captura de pantalla 2021-09-18 a las 10.45.04.png

              timconsidine 1 Reply Last reply Reply Quote 5
              • timconsidine
                timconsidine App Dev @martinkbs last edited by

                @martinkbs Great ! Very clear.

                1 Reply Last reply Reply Quote 1
                • girish
                  girish Staff @timconsidine last edited by

                  @timconsidine said in Has anyone got email working with subdomains?:

                  @marcusquinn I did something similar with email for a sub-domain, but in addition to the DNS I actually added the sub-domain as a domain in the Cloudron domains.

                  This key step is important. You have to add the subdomain in Domains view and then also enable email on the subdomain in the Email view. Without this, Cloudron won't listen on this "subdomain" for mails.

                  marcusquinn 1 Reply Last reply Reply Quote 3
                  • marcusquinn
                    marcusquinn @girish last edited by

                    @girish I did both of those things. I don't even know that it would have been possible to setup the mailboxes had I not.

                    It seems having a single app on that domain is the undocumented piece of the puzzle that perhaps shouldn't be necessary.

                    We're not here for a long time - but we are here for a good time :)
                    Jersey/UK
                    Work & Ecommerce Advice: https://brandlight.org
                    Personal & Software Tips: https://marcusquinn.com

                    robi girish 2 Replies Last reply Reply Quote 0
                    • robi
                      robi @marcusquinn last edited by

                      @marcusquinn said in Has anyone got email working with subdomains?:

                      It seems having a single app on that domain is the undocumented piece of the puzzle that perhaps shouldn't be necessary.

                      I don't think it is necessary as I process mail for other domains that cannot receive on their network. I don't have any apps set up for those domains.

                      Life of Advanced Technology

                      1 Reply Last reply Reply Quote 1
                      • girish
                        girish Staff @marcusquinn last edited by

                        @marcusquinn as @robi said, there is no such limitation of having a single app on that domain.

                        1 Reply Last reply Reply Quote 2
                        • First post
                          Last post
                        Powered by NodeBB