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. Support
  3. Mailgun Setup Issues

Mailgun Setup Issues

Scheduled Pinned Locked Moved Solved Support
mailrelaymailgun
18 Posts 4 Posters 2.8k Views 4 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.
    • W Offline
      W Offline
      will
      wrote on last edited by girish
      #1

      Cloudron Team,
      I'm having issues setting up mailgun as email relay. Whenever I try to put in my username and password, it says "authentication failed"
      Additionally, do I use the Cloudron DKIM key, or the one mailgun gives me to use?
      Also, I'm noticing that the generated DKIM key that cloudron populates in my DNS settings with Gandi use an old domain that my Cloudron lo longer resides at.

      Can you help untangle?

      1 Reply Last reply
      0
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #2
        1. Authentication failed, I am not sure. IIRC, you have to explicitly enable SMTP in mailgun and it gives you separate credentials (different from mailgun API credentials).

        2. You should setup DKIM key as instructed my mailgun. Mailgun will "re-write" stuff and sign it using the keys it provides. It will also ask you to create specific DNS entries that you have to setup manually.

        3. I guess this is because you changed the dashboard domains and deleted the previous domain? If this is the case, I can give you the instructions (have to fixup the database DNS record name for DKIM)

        W 1 Reply Last reply
        2
        • girishG girish
          1. Authentication failed, I am not sure. IIRC, you have to explicitly enable SMTP in mailgun and it gives you separate credentials (different from mailgun API credentials).

          2. You should setup DKIM key as instructed my mailgun. Mailgun will "re-write" stuff and sign it using the keys it provides. It will also ask you to create specific DNS entries that you have to setup manually.

          3. I guess this is because you changed the dashboard domains and deleted the previous domain? If this is the case, I can give you the instructions (have to fixup the database DNS record name for DKIM)

          W Offline
          W Offline
          will
          wrote on last edited by
          #3

          @girish On #3, thats exactly what I did, the instructions would be welcome, thanks!!
          I just ditched mailgun and went back to sendgrid.

          girishG 1 Reply Last reply
          1
          • W will

            @girish On #3, thats exactly what I did, the instructions would be welcome, thanks!!
            I just ditched mailgun and went back to sendgrid.

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #4

            The dkim selector is set in the database. You have to update it manually like this:

            mysql -uroot -ppassword -e "SELECT * FROM box.mail"
            

            The above output will show dkimSelector. It will be line cloudron-<yourdomain-nodots>. You can update it like this (be sure to replace the domain.com with the domain name (first column in above output) and currentdomain-nodots with your dashboard domain:

            mysql -uroot -ppassword -e "UPDATE box.mail SET dkimSelector='cloudron-currentdomain-nodots' WHERE domain='domain.com'"
            

            For example, if your current dashboard is at my.dashboard.com then the dkimSelector is cloudron-dashboardcom (this is just a convention).

            Then systemctl restart box should be it. In the email status view, you can also click on re-setup DNS records to push the change to the DNS.

            1 Reply Last reply
            1
            • W Offline
              W Offline
              will
              wrote on last edited by
              #5

              Much appreciated!

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by
                #6

                Hi, having the same issue. Not sure what you said helps. I've set up a new domain, mg.example.com, with cloudron being hosted on example.com (and my.example.com). I wonder whether the difference between Cloudron using STARTTLS vs Mailgun using SSL/TLS is the problem?

                Not really sure.

                girishG 1 Reply Last reply
                0
                • ? A Former User

                  Hi, having the same issue. Not sure what you said helps. I've set up a new domain, mg.example.com, with cloudron being hosted on example.com (and my.example.com). I wonder whether the difference between Cloudron using STARTTLS vs Mailgun using SSL/TLS is the problem?

                  Not really sure.

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #7

                  @edapm What error are you seeing? Any screenshots or error messages will help.

                  ? 1 Reply Last reply
                  0
                  • girishG girish

                    @edapm What error are you seeing? Any screenshots or error messages will help.

                    ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by
                    #8

                    @girish bc08d31b-fe54-4cef-9b74-17b96e6c3dd0-image.png

                    ? 1 Reply Last reply
                    0
                    • ? A Former User

                      @girish bc08d31b-fe54-4cef-9b74-17b96e6c3dd0-image.png

                      ? Offline
                      ? Offline
                      A Former User
                      wrote on last edited by
                      #9

                      @edapm Also not sure IMAP is working, how do I check?

                      girishG 1 Reply Last reply
                      0
                      • ? A Former User

                        @edapm Also not sure IMAP is working, how do I check?

                        girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote on last edited by
                        #10

                        @edapm said in Mailgun Setup Issues:

                        @edapm Also not sure IMAP is working, how do I check?

                        How did you check if IMAP is working or not? Are you not able to connect with your mail client?

                        ? 1 Reply Last reply
                        0
                        • girishG girish

                          @edapm said in Mailgun Setup Issues:

                          @edapm Also not sure IMAP is working, how do I check?

                          How did you check if IMAP is working or not? Are you not able to connect with your mail client?

                          ? Offline
                          ? Offline
                          A Former User
                          wrote on last edited by
                          #11

                          @girish I sent an email via another email to the address and it timed out after 44 hours.

                          ac3c8e14-5b2e-44b5-a3ed-a49a0dcecaec-image.png

                          girishG 1 Reply Last reply
                          0
                          • ? A Former User

                            @girish I sent an email via another email to the address and it timed out after 44 hours.

                            ac3c8e14-5b2e-44b5-a3ed-a49a0dcecaec-image.png

                            girishG Offline
                            girishG Offline
                            girish
                            Staff
                            wrote on last edited by
                            #12

                            @edapm Ah, incoming mail is still SMTP. IMAP is used just by mail clients to get emails for users.

                            I see that I cannot connect to port 25. This is why incoming mail does not work. Where is your server hosted? Do you have a cloud firewall in the front? If so, you have to open up incoming port 25. Please see https://docs.cloudron.io/security/#inbound-ports for the various ports you need to open in the firewall.

                            root@my:~# telnet my.forgenst.com 25
                            Trying 51.140.109.177...
                            
                            ? 1 Reply Last reply
                            0
                            • girishG girish

                              @edapm Ah, incoming mail is still SMTP. IMAP is used just by mail clients to get emails for users.

                              I see that I cannot connect to port 25. This is why incoming mail does not work. Where is your server hosted? Do you have a cloud firewall in the front? If so, you have to open up incoming port 25. Please see https://docs.cloudron.io/security/#inbound-ports for the various ports you need to open in the firewall.

                              root@my:~# telnet my.forgenst.com 25
                              Trying 51.140.109.177...
                              
                              ? Offline
                              ? Offline
                              A Former User
                              wrote on last edited by
                              #13

                              Hi @girish, yes I'm using Azure so port 25 is blocked, I cannot unblock it.

                              girishG 2 Replies Last reply
                              0
                              • ? A Former User

                                Hi @girish, yes I'm using Azure so port 25 is blocked, I cannot unblock it.

                                girishG Offline
                                girishG Offline
                                girish
                                Staff
                                wrote on last edited by
                                #14

                                @edapm Outbound port 25 is usually blocked (this is why you need a mailgun relay). But incoming port 25 is usually not blocked and this is something you setup in your azure firewall. This is the same as what you did for port 22/80/443. Just put 25 there as well.

                                1 Reply Last reply
                                0
                                • ? A Former User

                                  Hi @girish, yes I'm using Azure so port 25 is blocked, I cannot unblock it.

                                  girishG Offline
                                  girishG Offline
                                  girish
                                  Staff
                                  wrote on last edited by
                                  #15

                                  @edapm https://docs.microsoft.com/en-us/answers/questions/4059/azure-vm-smtp-inbound-port-25-is-blocked.html

                                  1 Reply Last reply
                                  0
                                  • marcusquinnM Offline
                                    marcusquinnM Offline
                                    marcusquinn
                                    wrote on last edited by
                                    #16

                                    I'd seriously consider anything other than Azure / AWS / GCP if you value your costs and time. So many faster, easier and cheaper solutions. Let us know if you have specific requirements as there's a ton of alternative and happier hosting experience among this community.

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

                                    ? 1 Reply Last reply
                                    1
                                    • marcusquinnM marcusquinn

                                      I'd seriously consider anything other than Azure / AWS / GCP if you value your costs and time. So many faster, easier and cheaper solutions. Let us know if you have specific requirements as there's a ton of alternative and happier hosting experience among this community.

                                      ? Offline
                                      ? Offline
                                      A Former User
                                      wrote on last edited by A Former User
                                      #17

                                      Hi @marcusquinn, yeah I only use Azure because I get free credits via the GitHub Developer Pack. Do you know any good (preferably free) alternatives?

                                      marcusquinnM 1 Reply Last reply
                                      0
                                      • ? A Former User

                                        Hi @marcusquinn, yeah I only use Azure because I get free credits via the GitHub Developer Pack. Do you know any good (preferably free) alternatives?

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

                                        @edapm Personally, I'm all-in with Hetzner, not free but the best value for features I've found, particularly having network DDoS protection as standard. Others recommended include Contabo and Scaleway.

                                        If you're getting free (inclusive) stuff from Microsoft then I suppose that's decent. Personally, I'm all GitLab, so anything GitHub is second-choice.

                                        I guess there's nothing truly free, including your time, but those are the options I recommend, otherwise it's support tickets to Azure and hope for their ability to allow for port needs.

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

                                        1 Reply Last reply
                                        0
                                        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