I just requested if mail works, to pinpoint the error…
It seems as if mail itself is working.
The fact that SoGo and Nextcloud don’t display any mailboxes and can’t add any confirms that. Mail is handled by NethServer itself. This indicates to me that those two Web-Applications are having LDAP problems.
Are you using LDAP or AD as account provider?
If you can login to both, and both use the account provider (normally), then this indicates that those two DO have LDAP connections, but something there isn’t working as intended.
Do you have all updates installed? There have been quite a few since the 7.8.2003 update…
LOG DOVECOT | Login via Outlook:
Jun 6 12:03:47 gateway dovecot: imap-login: Login: user=muellerm@srv.lan, method=PLAIN, rip=192.168.1.31, lip=192.168.1.1, mpid=7179, TLS, session=
LOG DOVECOT | Login via Nexctloud:
Jun 6 12:04:57 gateway dovecot: imap-login: Disconnected (disconnected before auth was ready, waited 0 secs): user=<>, rip=192.168.1.1, lip=192.168.1.1, TLS handshaking: SSL_accept() failed: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca: SSL alert number 48, session=
Jun 6 12:04:57 gateway dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=192.168.1.1, lip=192.168.1.1, TLS handshaking: SSL_accept() failed: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca: SSL alert number 48, session=<4/uQgmenNKTAqAEB>
No USER in Log-File!!!
LOG Nexcloud | Login via Web / Mail-App:
{“reqId”:“XttqtoinwM9Q2C5BQLj5AwAAAAM”,“level”:4,“time”:“2020-06-06T10:06:47+00:00”,“remoteAddr”:“192.168.1.31”,“user”:“ED26603A-FE52-49B7-B6E1-60F6AA040802”,“app”:“mail”,“method”:“POST”,“url”:“/nextcloud/index.php/apps/mail/api/accounts”,“message”:“Creating account failed: Could not connect to IMAP: Error connecting to mail server.”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0”,“version”:“18.0.4.2”}
Can not help you with Nextcloud Email…
However because SOGo does not appear to be working for you; fixing that might give some insight why Nextcloud does not work.
For SOGo:
You may (temporarily) enable extra debug-logging by uncommenting relevant lines, for starters ImapDebugEnabled and LDAPDebugEnabled , in /etc/sogo/sogo.conf (1) :
Glad at least SOGo is working which means the underlying mail-system works too.
You may want to edit the Title of the post to clarify better the issue is setting up Nextcloud mail;
to trigger other people who might set nextcloud-mail up successfully before…
Gtrz, Mark
EDIT: looking at the log is seem to be an certificate issue:
Do you have a valid certificate or do you (still) use the self-signed server certificate?
It looks like nethserver is not correctly configured regarding certificates. You could try configuring nextcloud’s mail client to connect using PLAIN (“Keine”, not SSL).
I’m using letsencrypt -signed certificates, not self signed certificates. Maybe nextcloud doesn’t like self signed certificates ?
Jun 27 20:58:33 gateway dovecot: imap-login: Login: user=muellerm@srv.lan, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=18385, secured, session=<63mBaRWpfIN/AAAB>
Jun 27 20:58:33 gateway dovecot: imap(muellerm@srv.lan): Logged out in=26 out=501
MailLog
Jun 27 21:04:41 gateway postfix/smtpd[21204]: connect from localhost[127.0.0.1]
Jun 27 21:04:41 gateway rspamd[2966]: ; proxy; proxy_accept_socket: accepted milter connection from /var/run/rspamd/worker-proxy port 0
Jun 27 21:04:41 gateway postfix/smtpd[21204]: SSL_accept error from localhost[127.0.0.1]: 0
Jun 27 21:04:41 gateway postfix/smtpd[21204]: warning: TLS library problem: 21204:error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca:s3_pkt.c:1493:SSL alert number 48:
Jun 27 21:04:41 gateway postfix/smtpd[21204]: lost connection after STARTTLS from localhost[127.0.0.1]
Jun 27 21:04:41 gateway postfix/smtpd[21204]: disconnect from localhost[127.0.0.1]
Jun 27 21:04:41 gateway rspamd[2966]: ; milter; rspamd_milter_process_command: got connection from 127.0.0.1:38764
Jun 27 21:04:41 gateway rspamd[2966]: ; proxy; proxy_milter_finish_handler: finished milter connection
Nextcloud-Log
{“reqId”:“XveXgfxvZs8O2FvrRBjGEAAAAAQ”,“level”:3,“time”:“2020-06-27T19:01:22+00:00”,“remoteAddr”:“192.168.1.31”,“user”:“ED26603A-FE52-49B7-B6E1-60F6AA040802”,“app”:“PHP”,“method”:“POST”,“url”:“/nextcloud/index.php/apps/mail/api/accounts”,“message”:“Undefined offset: 1 at /usr/share/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Smtp/Horde/Smtp.php#1049”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0”,“version”:“19.0.0.12”}
{“reqId”:“XveXgfxvZs8O2FvrRBjGEAAAAAQ”,“level”:3,“time”:“2020-06-27T19:01:22+00:00”,“remoteAddr”:“192.168.1.31”,“user”:“ED26603A-FE52-49B7-B6E1-60F6AA040802”,“app”:“PHP”,“method”:“POST”,“url”:“/nextcloud/index.php/apps/mail/api/accounts”,“message”:“Uninitialized string offset: 1 at /usr/share/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Smtp/Horde/Smtp/Exception.php#238”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0”,“version”:“19.0.0.12”}
{“reqId”:“XveXgfxvZs8O2FvrRBjGEAAAAAQ”,“level”:4,“time”:“2020-06-27T19:01:22+00:00”,“remoteAddr”:“192.168.1.31”,“user”:“ED26603A-FE52-49B7-B6E1-60F6AA040802”,“app”:“mail”,“method”:“POST”,“url”:“/nextcloud/index.php/apps/mail/api/accounts”,“message”:“Creating account failed: Could not open secure TLS connection to the server.”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0”,“version”:“19.0.0.12”}