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 74 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 nebulon

    So SnappyMail or Roundcube on the same Cloudron still work fine?

    WiseMetalheadW Online
    WiseMetalheadW Online
    WiseMetalhead
    translator
    wrote last edited by
    #6

    @nebulon said in Nextcloud Mail issues:

    So SnappyMail or Roundcube on the same Cloudron still work fine?

    Yes, Roundcube is also working just fine.

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

      Then it all points to Nextcloud to be honest. Are there any more error or debug logs from Nextcloud available when it fails?

      WiseMetalheadW 1 Reply Last reply
      0
      • nebulonN nebulon

        Then it all points to Nextcloud to be honest. Are there any more error or debug logs from Nextcloud available when it fails?

        WiseMetalheadW Online
        WiseMetalheadW Online
        WiseMetalhead
        translator
        wrote last edited by
        #8

        @nebulon said in Nextcloud Mail issues:

        there any more error or debug logs

        Here’s all I could find in the logs:

        2025-10-16T11:32:21Z 212.152.**.*** - - [16/Oct/2025:11:32:16 +0000] "POST /apps/mail/api/accounts HTTP/1.1" 400 104 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"
        
        {"reqId":"B2gTLx5mgFvdhfASC2sM","level":3,"time":"2025-10-16T10:07:35+00:00","remoteAddr":"212.152.**.***","user":"vladislav","app":"index","method":"GET","url":"/apps/mail/api/accounts/1/quota","message":"Error connecting to mail server.","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36","version":"31.0.9.1","exception":{"Exception":"Horde_Imap_Client_Exception","Message":"Error connecting to mail server.","Code":11,"Trace":[{"file":"/app/data/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":375,"function":"_connect","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/app/data/apps/mail/lib/IMAP/HordeImapClient.php","line":60,"function":"_login","class":"Horde_Imap_Client_Socket","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/app/data/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":853,"function":"_login","class":"OCA\\Mail\\IMAP\\HordeImapClient","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/app/data/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":1404,"function":"login","class":"Horde_Imap_Client_Base","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/app/data/apps/mail/lib/IMAP/FolderMapper.php","line":52,"function":"listMailboxes","class":"Horde_Imap_Client_Base","type":"->"},{"file":"/app/data/apps/mail/lib/Service/MailManager.php","line":594,"function":"getFolders","class":"OCA\\Mail\\IMAP\\FolderMapper","type":"->"},{"file":"/app/data/apps/mail/lib/Controller/AccountsController.php","line":470,"function":"getQuota","class":"OCA\\Mail\\Service\\MailManager","type":"->"},{"file":"/app/code/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"getQuota","class":"OCA\\Mail\\Controller\\AccountsController","type":"->"},{"file":"/app/code/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/app/code/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/app/code/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/app/code/lib/base.php","line":1063,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/app/code/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/app/data/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","Line":607,"message":"Error connecting to mail server.","exception":{"details":"[110] Connection timed out","logged":false,"raw_msg":"Error connecting to mail server."},"CustomMessage":"Error connecting to mail server."}}
        {"reqId":"V6QGeCfvi4X7PdvxiDiE","level":3,"time":"2025-10-16T10:07:26+00:00","remoteAddr":"212.152.**.***","user":"vladislav","app":"mail","method":"GET","url":"/apps/mail/","message":"Could not load account mailboxes: IMAP error synchronizing account 1: Error connecting to mail server.","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36","version":"31.0.9.1","exception":{"Exception":"OCA\\Mail\\Exception\\ServiceException","Message":"IMAP error synchronizing account 1: Error connecting to mail server.","Code":11,"Trace":[{"file":"/app/data/apps/mail/lib/Service/MailManager.php","line":139,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/app/data/apps/mail/lib/Controller/PageController.php","line":154,"function":"getMailboxes","class":"OCA\\Mail\\Service\\MailManager","type":"->"},{"file":"/app/code/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"index","class":"OCA\\Mail\\Controller\\PageController","type":"->"},{"file":"/app/code/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/app/code/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/app/code/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/app/code/lib/base.php","line":1063,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/app/code/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/app/data/apps/mail/lib/IMAP/MailboxSync.php","Line":110,"Previous":{"Exception":"Horde_Imap_Client_Exception","Message":"Error connecting to mail server.","Code":11,"Trace":[{"file":"/app/data/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":375,"function":"_connect","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/app/data/apps/mail/lib/IMAP/HordeImapClient.php","line":60,"function":"_login","class":"Horde_Imap_Client_Socket","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/app/data/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":853,"function":"_login","class":"OCA\\Mail\\IMAP\\HordeImapClient","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/app/data/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":1404,"function":"login","class":"Horde_Imap_Client_Base","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/app/data/apps/mail/lib/IMAP/FolderMapper.php","line":52,"function":"listMailboxes","class":"Horde_Imap_Client_Base","type":"->"},{"file":"/app/data/apps/mail/lib/IMAP/MailboxSync.php","line":107,"function":"getFolders","class":"OCA\\Mail\\IMAP\\FolderMapper","type":"->"},{"file":"/app/data/apps/mail/lib/Service/MailManager.php","line":139,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/app/data/apps/mail/lib/Controller/PageController.php","line":154,"function":"getMailboxes","class":"OCA\\Mail\\Service\\MailManager","type":"->"},{"file":"/app/code/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"index","class":"OCA\\Mail\\Controller\\PageController","type":"->"},{"file":"/app/code/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/app/code/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/app/code/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/app/code/lib/base.php","line":1063,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/app/code/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/app/data/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","Line":607},"message":"Could not load account mailboxes: IMAP error synchronizing account 1: Error connecting to mail server.","exception":{},"CustomMessage":"Could not load account mailboxes: IMAP error synchronizing account 1: Error connecting to mail server."}}
        
        1 Reply Last reply
        0
        • 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 Online
            WiseMetalheadW Online
            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 Online
                WiseMetalheadW Online
                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 Online
                      WiseMetalheadW Online
                      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 Online
                            WiseMetalheadW Online
                            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