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. Nextcloud
  3. Nextcloud Mail issues

Nextcloud Mail issues

Scheduled Pinned Locked Moved Nextcloud
18 Posts 3 Posters 85 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.
  • nebulonN Offline
    nebulonN Offline
    nebulon
    Staff
    wrote last edited by
    #9

    So the connection times out apparently.

    Can you open a webterminal into the nextcloud app and run those two checks for IMAP connection:

    telnet mail 9993
    telnet <yourpublicmaildomain> 993
    

    Are those connecting? If so, it is some issue in the Nextcloud mail app then.

    WiseMetalheadW 1 Reply Last reply
    0
    • nebulonN nebulon

      So the connection times out apparently.

      Can you open a webterminal into the nextcloud app and run those two checks for IMAP connection:

      telnet mail 9993
      telnet <yourpublicmaildomain> 993
      

      Are those connecting? If so, it is some issue in the Nextcloud mail app then.

      WiseMetalheadW Offline
      WiseMetalheadW Offline
      WiseMetalhead
      translator
      wrote last edited by
      #10

      @nebulon said in Nextcloud Mail issues:

      telnet mail 9993

      root@71780ea5-011c-4c09-886e-5f7e17e0b670:/app/code# telnet mail 9993
      Trying fd00:c107:d509::2...
      Connected to mail.
      Escape character is '^]'.
      Connection closed by foreign host.
      

      @nebulon said in Nextcloud Mail issues:

      telnet <yourpublicmaildomain> 993

      root@71780ea5-011c-4c09-886e-5f7e17e0b670:/app/code# telnet my.***.ru 993
      Trying 172.18.0.1...
      telnet: Unable to connect to remote host: Connection timed out
      
      1 Reply Last reply
      0
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote last edited by
        #11

        Then at least the local connection between the containers work fine. Is port 993 even publicly open on your system?

        Also please run https://docs.cloudron.io/troubleshooting/#troubleshooting-tool to get some basic overview there.

        WiseMetalheadW 1 Reply Last reply
        0
        • nebulonN nebulon

          Then at least the local connection between the containers work fine. Is port 993 even publicly open on your system?

          Also please run https://docs.cloudron.io/troubleshooting/#troubleshooting-tool to get some basic overview there.

          WiseMetalheadW Offline
          WiseMetalheadW Offline
          WiseMetalhead
          translator
          wrote last edited by
          #12

          @nebulon said in Nextcloud Mail issues:

          Is port 993 even publicly open on your system

          Yes, of course. I also can connect from a remote machine:

          vladislav@MINIPC:~/git$ telnet my.***.ru 993
          Trying 91.214.***.***...
          Connected to my.***.ru.
          Escape character is '^]'.
          Connection closed by foreign host.
          

          cloudron-support --troubleshoot

          wisemetalhead@lvhome:~$ sudo cloudron-support --troubleshoot
          [sudo] password for wisemetalhead: 
          Vendor: AZW Product: ME mini
          Linux: 6.14.0-33-generic
          Ubuntu: noble 24.04
          Processor: Intel(R) N150
          BIOS Intel(R) N150 To Be Filled By O.E.M. CPU @ 2.8GHz x 4
          RAM: 12001808KB
          Disk: /dev/mmcblk0p2   48G
          [OK]	node version is correct
          [FAIL]	Server has an IPv6 address but api.cloudron.io is unreachable via IPv6 (ping6 -q -c 1 api.cloudron.io)
          Instead of disabling IPv6 globally, you can disable it at an interface level.
          	sysctl -w net.ipv6.conf.enp1s0.disable_ipv6=1
          	sysctl -w net.ipv6.conf.enp2s0.disable_ipv6=1
          For the above configuration to persist across reboots, you have to add below to /etc/sysctl.conf
          	net.ipv6.conf.enp1s0.disable_ipv6=1
          	net.ipv6.conf.enp2s0.disable_ipv6=1
          wisemetalhead@lvhome:~$ sudo sysctl -w net.ipv6.conf.enp1s0.disable_ipv6=1
          net.ipv6.conf.enp1s0.disable_ipv6 = 1
          wisemetalhead@lvhome:~$ sudo sysctl -w net.ipv6.conf.enp2s0.disable_ipv6=1
          net.ipv6.conf.enp2s0.disable_ipv6 = 1
          wisemetalhead@lvhome:~$ sudo cloudron-support --troubleshoot
          Vendor: AZW Product: ME mini
          Linux: 6.14.0-33-generic
          Ubuntu: noble 24.04
          Processor: Intel(R) N150
          BIOS Intel(R) N150 To Be Filled By O.E.M. CPU @ 2.8GHz x 4
          RAM: 12001808KB
          Disk: /dev/mmcblk0p2   48G
          [OK]	node version is correct
          [OK]	IPv6 is enabled in kernel. No public IPv6 address
          [OK]	docker is running
          [OK]	docker version is correct
          [OK]	MySQL is running
          [OK]	nginx is running
          [OK]	dashboard cert is valid
          [OK]	dashboard is reachable via loopback
          [OK]	box v8.3.2 is running
          [OK]	netplan is good
          [OK]	DNS is resolving via systemd-resolved
          [OK]	Dashboard is reachable via domain name
          [WARN]	Domain ***.ru expiry check skipped because whois does not have this information
          [OK]	unbound is running
          
          1 Reply Last reply
          0
          • jdaviescoatesJ Offline
            jdaviescoatesJ Offline
            jdaviescoates
            wrote last edited by
            #13

            BTW, just for the record, I don't really use the Nextcloud Mail app (5.5.7), but do have it installed and it's working fine for me.... but I'm just about to update it to 5.5.10... still working fine. 🤷

            I use Cloudron with Gandi & Hetzner

            1 Reply Last reply
            1
            • nebulonN Offline
              nebulonN Offline
              nebulon
              Staff
              wrote last edited by
              #14

              Ah right that keeps getting me, so from within the container the my.domain.com would resolve to the local system and thus as you can see in the logs, it tries to contact 172.18.0.1 on port 993 which won't work. There you can only contact via port 9993 which is then bound to the mail container. So all you should have to do is to configure nextcloud mail to use that port instead of 993.

              Port 993 is routed via the external interface to the internal mail container 9993.

              WiseMetalheadW 1 Reply Last reply
              3
              • nebulonN nebulon

                Ah right that keeps getting me, so from within the container the my.domain.com would resolve to the local system and thus as you can see in the logs, it tries to contact 172.18.0.1 on port 993 which won't work. There you can only contact via port 9993 which is then bound to the mail container. So all you should have to do is to configure nextcloud mail to use that port instead of 993.

                Port 993 is routed via the external interface to the internal mail container 9993.

                WiseMetalheadW Offline
                WiseMetalheadW Offline
                WiseMetalhead
                translator
                wrote last edited by WiseMetalhead
                #15

                @nebulon said in Nextcloud Mail issues:

                So all you should have to do is to configure nextcloud mail to use that port instead of 993.

                Thanks @nebulon for the help!

                Mail app works again after a few changes to the Nextcloud config.

                First, I added these parameters to /app/data/config/config.php:

                'allow_local_remote_servers' => true,
                

                (because by default, Nextcloud doesn’t allow local hostnames or IP addresses as remote servers)

                'app.mail.verify-tls-peer' => false,
                

                (this just turns off TLS verification for IMAP/SMTP)

                Then, in the Nextcloud Mail settings, I set the host to mail, IMAP SSL/TLS port to 9993, and SMTP SSL/TLS port to 2465.

                After that, the app finally connected to my server!

                Without these steps, nothing worked. I tried different combinations of IPs, hostnames, and even disabled SSL/TLS and STARTTLS — no luck.

                The thing is, I still don’t know why my Mail app worked perfectly with the old settings for months and suddenly stopped now. And yeah, I’m a bit concerned about the security of this workaround.

                jdaviescoatesJ 1 Reply Last reply
                1
                • nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote last edited by
                  #16

                  Since those are all local connections on your server itself, the security aspect can be ignored, as if anyone could intercept there, that person would already have access to the whole server. Or are you worried about something else?

                  WiseMetalheadW 1 Reply Last reply
                  1
                  • WiseMetalheadW WiseMetalhead

                    @nebulon said in Nextcloud Mail issues:

                    So all you should have to do is to configure nextcloud mail to use that port instead of 993.

                    Thanks @nebulon for the help!

                    Mail app works again after a few changes to the Nextcloud config.

                    First, I added these parameters to /app/data/config/config.php:

                    'allow_local_remote_servers' => true,
                    

                    (because by default, Nextcloud doesn’t allow local hostnames or IP addresses as remote servers)

                    'app.mail.verify-tls-peer' => false,
                    

                    (this just turns off TLS verification for IMAP/SMTP)

                    Then, in the Nextcloud Mail settings, I set the host to mail, IMAP SSL/TLS port to 9993, and SMTP SSL/TLS port to 2465.

                    After that, the app finally connected to my server!

                    Without these steps, nothing worked. I tried different combinations of IPs, hostnames, and even disabled SSL/TLS and STARTTLS — no luck.

                    The thing is, I still don’t know why my Mail app worked perfectly with the old settings for months and suddenly stopped now. And yeah, I’m a bit concerned about the security of this workaround.

                    jdaviescoatesJ Offline
                    jdaviescoatesJ Offline
                    jdaviescoates
                    wrote last edited by jdaviescoates
                    #17

                    @WiseMetalhead said in Nextcloud Mail issues:

                    The thing is, I still don’t know why my Mail app worked perfectly with the old settings for months and suddenly stopped now.

                    I guess it must've / might've had something to do with you moving the docker stuff around 🤷 - and perhaps it kept working for a little while after you did that due to caching or something 🤷 would be my wild guesses 🙂

                    I use Cloudron with Gandi & Hetzner

                    1 Reply Last reply
                    1
                    • nebulonN nebulon

                      Since those are all local connections on your server itself, the security aspect can be ignored, as if anyone could intercept there, that person would already have access to the whole server. Or are you worried about something else?

                      WiseMetalheadW Offline
                      WiseMetalheadW Offline
                      WiseMetalhead
                      translator
                      wrote last edited by
                      #18

                      @nebulon said in Nextcloud Mail issues:

                      Or are you worried about something else?

                      Nope, not at all. Thanks again for your help and explanation.

                      @jdaviescoates said in Nextcloud Mail issues:

                      I guess it must've / might've had something to do with you moving the docker stuff around

                      Yeah, I think that's the case. If I didn't already have a complex setup, I might consider just reinstalling Cloudron, but for now that's not an option.
                      And to be honest, it doesn't make much sense to reinstall the whole system just because of a single Nextcloud app 🙂 If it works for now, it works.

                      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