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
  • Brite
  • 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. N8N
  3. Unable to setup a functional SMTP account with local cloudron mailbox

Unable to setup a functional SMTP account with local cloudron mailbox

Scheduled Pinned Locked Moved N8N
mail
11 Posts 3 Posters 173 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.
  • J Offline
    J Offline
    joseph
    Staff
    wrote last edited by joseph
    #2

    @overclockmp I would say first test using swaks. Open a web terminal and use swaks to test your credentials. Something like:

    swaks --server my.domain.com -p 587 --from "from@domain.com" --body "Test mail" --auth-user "from@domain.com" --auth-password "password"
    
    1 Reply Last reply
    0
    • O Offline
      O Offline
      overclockmp
      wrote last edited by overclockmp
      #3

      Hi @joseph, thanks for the assistance.
      Running the command above with --server mail.domain.com, I get "Network Unreachable".
      Running it with --server my.domain.com, I get "Connection Timeout".
      Under Email > Domain > Status, the outbound SMTP is green.

      The more I look into this, the more it seems that I would have to use mailjet directly instead of going through the outbound SMTP, but I am not sure if it's a good approach.

      J 1 Reply Last reply
      0
      • O Offline
        O Offline
        overclockmp
        wrote last edited by
        #4

        Hello 👋, just following up here to see if there are any other ideas...
        Thanks for the help

        1 Reply Last reply
        0
        • jamesJ Offline
          jamesJ Offline
          james
          Staff
          wrote last edited by
          #5

          Hello @overclockmp
          Could you please share a screenshot of your N8N configuration for SMTP?

          O 1 Reply Last reply
          0
          • O overclockmp

            Hi @joseph, thanks for the assistance.
            Running the command above with --server mail.domain.com, I get "Network Unreachable".
            Running it with --server my.domain.com, I get "Connection Timeout".
            Under Email > Domain > Status, the outbound SMTP is green.

            The more I look into this, the more it seems that I would have to use mailjet directly instead of going through the outbound SMTP, but I am not sure if it's a good approach.

            J Offline
            J Offline
            joseph
            Staff
            wrote last edited by joseph
            #6

            @overclockmp said in Unable to setup a functional SMTP account with local cloudron mailbox:

            Running the command above with --server mail.domain.com, I get "Network Unreachable".
            Running it with --server my.domain.com, I get "Connection Timeout".

            I would start here... Can you ping/host/dig mail.domain.com ? Can you telnet mail.domain.com 587 ?

            1 Reply Last reply
            0
            • O Offline
              O Offline
              overclockmp
              wrote last edited by overclockmp
              #7

              Apologies for the delay, I must have missed the notification with the holidays. Thanks for your answer.

              @joseph,

              Can you ping/host/dig mail.domain.com?

              Yes, using dig from n8n web terminal:

              # dig mail.domain.com
              ; <<>> DiG 9.18.30-0ubuntu0.24.04.2-Ubuntu <<>> mail.domain.com
              ;; global options: +cmd
              ;; Got answer:
              ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27695
              ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
              
              ;; OPT PSEUDOSECTION:
              ; EDNS: version: 0, flags:; udp: 65494
              ;; QUESTION SECTION:
              ;mail.domain.com.               IN      A
              
              ;; ANSWER SECTION:
              mail.domain.com.        0       IN      CNAME   my.domain.com.
              my.domain.com.  0       IN      A       192.168.1.3
              
              ;; Query time: 44 msec
              ;; SERVER: 127.0.0.11#53(127.0.0.11) (UDP)
              ;; WHEN: Sat Dec 27 16:19:45 UTC 2025
              ;; MSG SIZE  rcvd: 81
              

              Using host from n8n web terminal:

              # host mail.domain.com
              mail.domain.com is an alias for my.domain.com.
              my.domain.com has address 192.168.1.3
              my.domain.com has IPv6 address 2606:4700:130:436c:6f75:6466:6c61:7265
              

              Can you telnet mail.domain.com 587?

              No, it hangs and times out on the web terminal and connection is refused through ssh:

              # telnet mail.domain.com 587
              Trying 192.168.1.3...
              Connection failed: Connection timed out
              Trying 2606:4700:130:436c:6f75:6466:6c61:7265...
              telnet: Unable to connect to remote host: Network is unreachable
              

              It is probably worth noting that I am using a pihole as local DNS. Not sure if it has any impact...

              1 Reply Last reply
              0
              • jamesJ james

                Hello @overclockmp
                Could you please share a screenshot of your N8N configuration for SMTP?

                O Offline
                O Offline
                overclockmp
                wrote last edited by
                #8

                Hi @james, here is a redacted screenshot that should match my description at the beginning of this thread:

                742d9edb-e7fc-4770-91d5-bd880cab3fe7-image.png

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  joseph
                  Staff
                  wrote last edited by
                  #9

                  @overclockmp so the problem is that connection to port 587 is not working. This is not a DNS problem (from what I can tell). You can try telnet 192.168.1.3 587 . This is not working and it's some networking issue in your set up. Maybe the VM/hypervisor settings should allow port 587 to be looped back?

                  1 Reply Last reply
                  1
                  • O Offline
                    O Offline
                    overclockmp
                    wrote last edited by
                    #10

                    Thank you. I shall investigate the host OS iptables config then.
                    The thing that I fail to understand is that other apps seem to be able to send emails without any issues, through that mailjet relay. So I don't quite understand what's different here with this current configuration in n8n. My apologies if I am missing something very trivial here...

                    1 Reply Last reply
                    0
                    • O Offline
                      O Offline
                      overclockmp
                      wrote last edited by
                      #11

                      Ok, so after looking into open ports a bit more, it turns out that there is nothing listening on port 587. As such, there is no SMTP server running or listening to any port whatsoever. I figure that an SMTP server may only start running if I enable incoming emails (setting which was not enabled, purposefully). When I enabled incoming email setting, sudo netstat -tlnp | grep 587 was finally returning something and n8n configuration worked fine.

                      So to sum up, if my understanding is correct, when only using outbound mail, there isn't an actual SMTP server running, but only some kind of abstraction that containerized apps can use to send email directly through the mail relay (the internals of this are fuzzy to me...), so I need to enable incoming emails in order to send emails... 🙂

                      But I'm glad I was at least able to make this work before going into 2026. Thanks for the help and for putting me on the right path here.

                      Thank you for all the great work you do Cloudron Team, and wishing you all the best for the new year :).

                      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