zentyal / zentyal

Linux Small Business Server
http://www.zentyal.org
GNU General Public License v2.0
523 stars 139 forks source link

After upgrade to Zentyal version 7 SOGo doesn't show any mails #2040

Open husisusi opened 3 years ago

husisusi commented 3 years ago

After upgrade to Zentyal 7 I was able to login on SOGo but there are no email and I got this error: grafik

Workaround: You have to enable "IMAP service". Just "Secure IMAPS service" alone is not enough.

This issue was not present on Zentyal 6.2

djoven89 commented 3 years ago

Hi @husisusi ,

We have confirmed the bug and added it to the roadmap.

Thank you for your contribution.

Best regards, Daniel Joven.

raytracy commented 2 years ago

I got same problem after upgrade from 6.2 to 7.0 and found a workaround:

SOGo complain the communication failure due to follow error found in /var/log/sogo/sogo.log :

2021-08-21 22:42:15.484 sogod[12364:12364] ERROR(-[NGActiveSSLSocket startTLS]): couldn't setup SSL connection on host 127.0.0.1 (error:00000001:lib(0):func(0):reason(1))... Aug 21 22:42:15 sogod [12364]: [ERROR] <0x0x559ee76b6290[NGImap4ConnectionManager]> IMAP4 login failed: host=127.0.0.1, user=test@xxxx.domain.tld, pwd=yes url=imaps://test%40xxxx.domain.tld@127.0.0.1/?tls=NO&tlsVerifyMode=default base=(null) base-class=(null)) = <0x0x559ee7799520[NGImap4Client]: login=test@xxxx.domain.tld(pwd) address=<0x0x559ee74e3740[NGInternetSocketA ddress]: host=127.0.0.1 port=993>> Aug 21 22:42:15 sogod [12364]: [ERROR] <0x559ee7747600[SOGoMailAccount]:0> Could not connect IMAP4

The SOGo package try to connect IMAPS with hostname 127.0.0.1, but my IMAPS has bind to a SSL certificate issued with hostname xxxx.domain.tld, that cause SSL hostname mismatch when they handshake SSL session, so the SOGo abandon SSL connection.

Since I cannot find a way to force SOGo ignore the SSL mismatch error (many library has this option can turn ignore on), I have modified /usr/share/perl5/EBox/SOGo.pm from: original: my $imapServer = ($mail->imap() ? '127.0.0.1:143' : 'imaps://127.0.0.1:993'); to: my $imapServer = ($mail->imap() ? '127.0.0.1:143' : 'imaps://xxxx.domain.tld:993');

And let it rebuild SOGo configuration in /etc/sogo/sogo.conf as: SOGoIMAPServer = imaps://xxxx.domain.tld:993;

This solved the complain and connection back to normal because the SSL hostname has matched.

I believe that 6.2 probably force the localhost connection via IMAP without SSL so there is no hostname mismatch situation, but 7.0 change the connection to localhost by IMAPS (ssl enabled) and face to the hostname mismatch.

My IMAPS has turned on both 6.2 and 7.0.

chapderprinz commented 2 years ago

Got the same Problem. Installed Zentyal 7.0 from scratch (used this ISO Image: https://download02.public.zentyal.com/zentyal-7.0-development-amd64.iso). Confgured Zentyal Server and made system and component updates (heaps of new packages and two new errors with dhcp / clamav). After updates and solving the dhcp and antivirus error i started SOGo the first time and got the error described above. A (temporary) workaround is to activate the unsecure IMAP service. But i dont like to open this port in productive environment.

Any solution in sight ?

Regards, Charles

Neustradamus commented 2 years ago

@djoven89: Any news?