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. Outbound SMTP not working on my External Relay

Outbound SMTP not working on my External Relay

Scheduled Pinned Locked Moved Solved Support
emailrelay
21 Posts 4 Posters 3.5k 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.
  • S subtlecourage

    Hello all! I am trying to setup my server to house my employees, however, an issue I am running into is in my email logs I get the error below
    d209fb38-cb83-4303-a84e-17656c33df51-image.png

    I set up my SMTP outbound server according to the docs here -

    I have a green circle next to my domain in my Domains subsection under my Email section
    458d1ecd-a805-42a5-bf11-4206e196e13f-image.png

    My email logs look like this
    58f274a0-9b59-4d44-9a52-5e0dc4e96223-image.png

    My SMTP status says
    b128e042-339e-4567-a54e-bd1053d941c8-image.png

    And the outbound settings are fully filled out.
    b9c3ff80-fc06-4e15-847f-e1ff462a67d0-image.png

    I have verified that my proper port number is 465.

    And Finally, I verified I am using the right username and password as well.

    What am I doing wrong?

    fbartelsF Offline
    fbartelsF Offline
    fbartels
    App Dev
    wrote on last edited by
    #2

    Hi @subtlecourage,

    • is that all the same domain for these error messages?
    • when you manually look up the mx records of these domains, do they exist?
    • if you do a portscan on one of the mx hosts, does something listen on port 25?
    S 1 Reply Last reply
    0
    • fbartelsF fbartels

      Hi @subtlecourage,

      • is that all the same domain for these error messages?
      • when you manually look up the mx records of these domains, do they exist?
      • if you do a portscan on one of the mx hosts, does something listen on port 25?
      S Offline
      S Offline
      subtlecourage
      wrote on last edited by
      #3

      @fbartels

      @fbartels said in Outbound SMTP not working on my External Relay:

      Hi @subtlecourage,

      • is that all the same domain for these error messages?

      Yes, the domain name is the same across the board

      • when you manually look up the mx records of these domains, do they exist?

      c58ca8ac-7933-4d4a-81db-2e2f81a3950e-image.png

      • if you do a portscan on one of the mx hosts, does something listen on port 25?
        This one, I dont quite understand.

      I am able to send and receive email via my domain through the hosted provider
      Cloudron is set up to do outbound only

      1 Reply Last reply
      0
      • S subtlecourage

        Hello all! I am trying to setup my server to house my employees, however, an issue I am running into is in my email logs I get the error below
        d209fb38-cb83-4303-a84e-17656c33df51-image.png

        I set up my SMTP outbound server according to the docs here -

        I have a green circle next to my domain in my Domains subsection under my Email section
        458d1ecd-a805-42a5-bf11-4206e196e13f-image.png

        My email logs look like this
        58f274a0-9b59-4d44-9a52-5e0dc4e96223-image.png

        My SMTP status says
        b128e042-339e-4567-a54e-bd1053d941c8-image.png

        And the outbound settings are fully filled out.
        b9c3ff80-fc06-4e15-847f-e1ff462a67d0-image.png

        I have verified that my proper port number is 465.

        And Finally, I verified I am using the right username and password as well.

        What am I doing wrong?

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

        @subtlecourage said in Outbound SMTP not working on my External Relay:

        I have verified that my proper port number is 465.

        Usually port 465 is the (obsolete) TLS port. Most providers use port 587 as STARTTLS. Does your provider have port 587? If so, can you try that instead?

        That said, the email relay setup should actually try to make a connection to check if the connection works and clearly you managed to save the settings, so somehow port 465 works.

        S 1 Reply Last reply
        0
        • S subtlecourage

          Hello all! I am trying to setup my server to house my employees, however, an issue I am running into is in my email logs I get the error below
          d209fb38-cb83-4303-a84e-17656c33df51-image.png

          I set up my SMTP outbound server according to the docs here -

          I have a green circle next to my domain in my Domains subsection under my Email section
          458d1ecd-a805-42a5-bf11-4206e196e13f-image.png

          My email logs look like this
          58f274a0-9b59-4d44-9a52-5e0dc4e96223-image.png

          My SMTP status says
          b128e042-339e-4567-a54e-bd1053d941c8-image.png

          And the outbound settings are fully filled out.
          b9c3ff80-fc06-4e15-847f-e1ff462a67d0-image.png

          I have verified that my proper port number is 465.

          And Finally, I verified I am using the right username and password as well.

          What am I doing wrong?

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

          @subtlecourage You can also do this:

          • Open the mail log window (It's in the email view in the bottom)
          • Then, click the plane button next to the domain. This sends a test email.

          Can you paste the logs here or to https://paste.cloudron.io ? Thanks,

          S 1 Reply Last reply
          0
          • girishG girish

            @subtlecourage said in Outbound SMTP not working on my External Relay:

            I have verified that my proper port number is 465.

            Usually port 465 is the (obsolete) TLS port. Most providers use port 587 as STARTTLS. Does your provider have port 587? If so, can you try that instead?

            That said, the email relay setup should actually try to make a connection to check if the connection works and clearly you managed to save the settings, so somehow port 465 works.

            S Offline
            S Offline
            subtlecourage
            wrote on last edited by
            #6

            @girish When I try that port (587) I get 8f7c31b1-f778-48c0-9402-8472a1a1b0a2-image.png

            I am using Fastmail

            1 Reply Last reply
            0
            • girishG girish

              @subtlecourage You can also do this:

              • Open the mail log window (It's in the email view in the bottom)
              • Then, click the plane button next to the domain. This sends a test email.

              Can you paste the logs here or to https://paste.cloudron.io ? Thanks,

              S Offline
              S Offline
              subtlecourage
              wrote on last edited by
              #7

              @girish I have DM'ed you the logs

              girishG 1 Reply Last reply
              0
              • S subtlecourage

                @girish I have DM'ed you the logs

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

                @subtlecourage thanks! I should have been clearer but I wanted the raw logs. There is a button in the top right that says Logs. Can you give me those logs ? They contain info on why the server is unable to connect to MX.

                0b38e023-368d-4e8b-862b-88b8764c8c5c-image.png

                S 1 Reply Last reply
                0
                • girishG girish

                  @subtlecourage thanks! I should have been clearer but I wanted the raw logs. There is a button in the top right that says Logs. Can you give me those logs ? They contain info on why the server is unable to connect to MX.

                  0b38e023-368d-4e8b-862b-88b8764c8c5c-image.png

                  S Offline
                  S Offline
                  subtlecourage
                  wrote on last edited by
                  #9

                  @girish Sent it your way!

                  S 1 Reply Last reply
                  0
                  • S subtlecourage

                    @girish Sent it your way!

                    S Offline
                    S Offline
                    subtlecourage
                    wrote on last edited by
                    #10

                    @subtlecourage Let me know what you think of those logs

                    girishG 2 Replies Last reply
                    0
                    • S subtlecourage

                      @subtlecourage Let me know what you think of those logs

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

                      @subtlecourage I didn't find the time today, but will take a look tomorrow.

                      1 Reply Last reply
                      1
                      • S subtlecourage

                        @subtlecourage Let me know what you think of those logs

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

                        @subtlecourage So, the connections are failing with "socket timeout waiting on connect" . Can you SSH into your server and check if "telnet smtp.xxx.com 465" works? If it doesn't , then it could either be the VPS provider is blocking it OR that the smtp provider is blocking it. I tried to connect from my server(s) and it connects fine. So, it's probably a VPS thing. Are you on linode by any chance? I recently learnt they block outbound port 465 and 587 by default on new accounts.

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          subtlecourage
                          wrote on last edited by
                          #13

                          @girish No, I am using hetzner

                          I am getting a -bash: telnet: command not found

                          Ok, just kidding.

                          I installed it.

                          I got this

                          :~$ telnet smtp.fastmail.com 465
                          Trying 66.111.4.140...
                          Connected to smtp.fastmail.com.
                          Escape character is '^]'.
                          Connection closed by foreign host.

                          girishG 1 Reply Last reply
                          0
                          • S subtlecourage

                            @girish No, I am using hetzner

                            I am getting a -bash: telnet: command not found

                            Ok, just kidding.

                            I installed it.

                            I got this

                            :~$ telnet smtp.fastmail.com 465
                            Trying 66.111.4.140...
                            Connected to smtp.fastmail.com.
                            Escape character is '^]'.
                            Connection closed by foreign host.

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

                            @subtlecourage Ah ok, so the smtp connection works well enough. Strange then, did you figure this one out already?

                            S 1 Reply Last reply
                            0
                            • girishG girish

                              @subtlecourage Ah ok, so the smtp connection works well enough. Strange then, did you figure this one out already?

                              S Offline
                              S Offline
                              subtlecourage
                              wrote on last edited by
                              #15

                              @girish said in Outbound SMTP not working on my External Relay:

                              @subtlecourage Ah ok, so the smtp connection works well enough. Strange then, did you figure this one out already?

                              Sadly, no.
                              I keep getting these messages
                              [outbound] Ongoing connection failed to 66.111.4.140:465 : socket timeout waiting on connect

                              That is to fastmails servers

                              Is there any DNS setting that could cause that?

                              S 1 Reply Last reply
                              0
                              • S subtlecourage

                                @girish said in Outbound SMTP not working on my External Relay:

                                @subtlecourage Ah ok, so the smtp connection works well enough. Strange then, did you figure this one out already?

                                Sadly, no.
                                I keep getting these messages
                                [outbound] Ongoing connection failed to 66.111.4.140:465 : socket timeout waiting on connect

                                That is to fastmails servers

                                Is there any DNS setting that could cause that?

                                S Offline
                                S Offline
                                subtlecourage
                                wrote on last edited by
                                #16

                                @subtlecourage

                                I cant get any welcome emails to send, nor password reset emails. This is neutering my install.

                                girishG 2 Replies Last reply
                                0
                                • S subtlecourage

                                  @subtlecourage

                                  I cant get any welcome emails to send, nor password reset emails. This is neutering my install.

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

                                  @subtlecourage Not sure what is going on here. Are you able to contact us on support@cloudron.io, so we can debug on the server?

                                  1 Reply Last reply
                                  0
                                  • S subtlecourage

                                    @subtlecourage

                                    I cant get any welcome emails to send, nor password reset emails. This is neutering my install.

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

                                    @subtlecourage my bad, I should have noticed. The issue here is that Cloudron's relay system only supports STARTTLS. This means that you have to use port 587 in your relay. Port 465 is pure "TLS" (as opposed to port 587 which is opportunistic TLS). Can you try with port 587? If that doesn't work, let me debug further.

                                    S 1 Reply Last reply
                                    1
                                    • girishG girish

                                      @subtlecourage my bad, I should have noticed. The issue here is that Cloudron's relay system only supports STARTTLS. This means that you have to use port 587 in your relay. Port 465 is pure "TLS" (as opposed to port 587 which is opportunistic TLS). Can you try with port 587? If that doesn't work, let me debug further.

                                      S Offline
                                      S Offline
                                      subtlecourage
                                      wrote on last edited by
                                      #19

                                      @girish said in Outbound SMTP not working on my External Relay:

                                      @subtlecourage my bad, I should have noticed. The issue here is that Cloudron's relay system only supports STARTTLS. This means that you have to use port 587 in your relay. Port 465 is pure "TLS" (as opposed to port 587 which is opportunistic TLS). Can you try with port 587? If that doesn't work, let me debug further.

                                      Hah, that solved it.

                                      Thank you.

                                      S 1 Reply Last reply
                                      1
                                      • S subtlecourage

                                        @girish said in Outbound SMTP not working on my External Relay:

                                        @subtlecourage my bad, I should have noticed. The issue here is that Cloudron's relay system only supports STARTTLS. This means that you have to use port 587 in your relay. Port 465 is pure "TLS" (as opposed to port 587 which is opportunistic TLS). Can you try with port 587? If that doesn't work, let me debug further.

                                        Hah, that solved it.

                                        Thank you.

                                        S Offline
                                        S Offline
                                        subtlecourage
                                        wrote on last edited by subtlecourage
                                        #20

                                        @girish

                                        It is doing something weird though.

                                        It says it should be coming from noreplay@domain.com, but instead it is coming from imanalias@domain.com

                                        Any ideas?

                                        girishG 1 Reply Last reply
                                        0
                                        • S subtlecourage

                                          @girish

                                          It is doing something weird though.

                                          It says it should be coming from noreplay@domain.com, but instead it is coming from imanalias@domain.com

                                          Any ideas?

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

                                          @subtlecourage said in Outbound SMTP not working on my External Relay:

                                          It says it should be coming from noreplay@domain.com, but instead it is coming from imanalias@domain.com

                                          Can you clarify what you mean by "it says"? Is there some error/warning somewhere? Also, I assume that you have put a custom domain in fastmail and also fastmail is able to relay mail as any email address i.e <anything>@domain.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