I tried to use the nextcloud Mail app today to receive mails on an NS8 instance. However, I do not get it to work.
I am using current NS8 server based on Debian, freshly installed yesterday, hosting both the Mail and Nextcloud apps. In nextcloud, I installed the Mail app, and tried to configure the ns8 as Mail server. However, I always get “IMAP Server cannot be reached” within nextcloud, and the mail account cannot be created.
As IMAP Server, I tried both the host name of the ns8 server, the IP, and 127.0.0.1, but nothing works.
Thank you. I tried it with the same settings related to my setup, and it is not working with “IMAP server cannot be reached”.
When I enter the nextcloud container with
I can ping the mail host, and it resolves to 127.0.1.1
There is no telneg installed in the container, so I cannot try to connect to port 143 unfortunately.
I have Debian instead of rocky. Could that have an impact?
Initially, I have left the mailserver hostname unconfigured, so it defaults to the NS8 hostname. The nextcloud container resolves this name to 127.0.1.1, and port 143 cannot be reached from within nextcloud (tried with telnet, thanks for the hint how to install it).
As step 2, I tried to telnet into the server IP:143 from the nextcloud container, which works. However, when entering the IP address in the nextcloud mail app, it still fails to connect (reason unclear to me).
As a third step, I tried to configure a seperate mail hostname: I setup a specific DNS A and PTR record for the mail service, and configured the mail hostname in NS8 Mail app under settings / general. Now, I entered that hostname into the nextcloud app, which works as described by @mrmarkuz
Thank you again for the help, problem solved. However, I do not understand why entering the IP as mailserver fails in the nextcloud app, while entering a hostname that points to exactly the same IP works…