Mailclient won't connect to Kopano

Hello UCS-Comunity,
I have a Problem with Kopano and have no other Option, than asking here. I have installed UCS in a VM. I went through the Setup-Assistant and didn’t install any additional Software. I Updated anything and installed Kopano-Core, Kopano Z-Push and Kopano-Web-App. After that, I Added two Kopano users, and gave them any Features (Usersettiongs -> Kopano) I could find (POP3 access, IMAP access, ActiveSync access, Outlook over ActiveSync access). In the Web-App, I tried to send an Email from one to another and it worked.
So I tried to use Thunderbird. I set manually the IP-Adress in my Hostfile (Windows) to the Name of the local Domain and tried to add the user. Thunderbird found the Server-Configuration:
image
after that, I clicked on Weiter (Next) and this appeared:
image
In English, it says “Unable to Login at server. Probably wrong configuration, username or password”.
The Gateway-Config only says:
image
I also tried it in Outlook: Same error

I red many posts about that topic, but I couldn’t find any solution.
I hope, that someone can help me.

Sincerely
Benedikt

Hi @Benedikt.Geiger,

in the default configuration you have to log into Kopano with your username and not the email (this is different however when it comes to sending mails via Univentions smtp). Not a Thunderbird user myself but I would guess that you need to say “configure manually”.

You could also raise the log level of kopano-gateway to see what actually happens. Hints for changing configuration can be found at https://wiki.z-hub.io/display/K4U/Changing+configuration+options

The Username (Last Line) is only max and I also tried it manually.
If I try setting the Log-Level, nothing happens:

root@ucs:~# ucr set kopano/cfg/server/log_level=1
Setting kopano/cfg/server/log_level
Module: kopano-cfg
root@ucs:~# journalctl -u kopano-gateway
-- Logs begin at Thu 2020-07-09 12:41:54 CEST, end at Mon 2020-09-07 15:56:32 CE
Sep 07 11:41:59 ucs systemd[1]: Started Kopano Groupware Core IMAP/POP3 Gateway.
Sep 07 11:41:59 ucs kopano-gateway[3432]: Starting kopano-gateway version 8.7.1
Sep 07 11:41:59 ucs kopano-gateway[3432]: Starting kopano-gateway version 8.7.1
Sep 07 11:45:13 ucs systemd[1]: Stopping Kopano Groupware Core IMAP/POP3 Gateway
Sep 07 11:45:13 ucs kopano-gateway[3432]: POP3/IMAP Gateway will now exit
Sep 07 11:45:13 ucs systemd[1]: Stopped Kopano Groupware Core IMAP/POP3 Gateway.
Sep 07 11:45:13 ucs systemd[1]: Started Kopano Groupware Core IMAP/POP3 Gateway.
Sep 07 11:45:13 ucs kopano-gateway[6604]: Starting kopano-gateway version 8.7.1
Sep 07 11:45:13 ucs kopano-gateway[6604]: Starting kopano-gateway version 8.7.1
Sep 07 12:14:14 ucs kopano-gateway[6604]: Client disconnected
Sep 07 12:14:14 ucs kopano-gateway[6604]: Client disconnected
Sep 07 12:35:39 ucs kopano-gateway[6604]: Client disconnected
Sep 07 12:37:00 ucs kopano-gateway[6604]: Client disconnected
Sep 07 12:37:00 ucs kopano-gateway[6604]: Client disconnected
Sep 07 13:05:42 ucs systemd[1]: Stopping Kopano Groupware Core IMAP/POP3 Gateway
Sep 07 13:05:42 ucs systemd[1]: Stopped Kopano Groupware Core IMAP/POP3 Gateway.
-- Reboot --
Sep 07 15:06:29 ucs systemd[1]: Started Kopano Groupware Core IMAP/POP3 Gateway.
Sep 07 15:06:30 ucs kopano-gateway[454]: Starting kopano-gateway version 8.7.1 (
Sep 07 15:06:30 ucs kopano-gateway[454]: Starting kopano-gateway version 8.7.1 (
Sep 07 13:11:38 ucs kopano-gateway[454]: Client disconnected
Sep 07 13:11:38 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:53:47 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:53:47 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:54:47 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:54:47 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:54:49 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:54:49 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:55:07 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:55:07 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:56:02 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:56:02 ucs kopano-gateway[454]: Client disconnected

root@ucs:~# ucr set kopano/cfg/server/log_level=6
Setting kopano/cfg/server/log_level
Module: kopano-cfg
root@ucs:~# journalctl -u kopano-gateway
-- Logs begin at Thu 2020-07-09 12:41:54 CEST, end at Mon 2020-09-07 15:56:32 CE
Sep 07 11:41:59 ucs systemd[1]: Started Kopano Groupware Core IMAP/POP3 Gateway.
Sep 07 11:41:59 ucs kopano-gateway[3432]: Starting kopano-gateway version 8.7.1
Sep 07 11:41:59 ucs kopano-gateway[3432]: Starting kopano-gateway version 8.7.1
Sep 07 11:45:13 ucs systemd[1]: Stopping Kopano Groupware Core IMAP/POP3 Gateway
Sep 07 11:45:13 ucs kopano-gateway[3432]: POP3/IMAP Gateway will now exit
Sep 07 11:45:13 ucs systemd[1]: Stopped Kopano Groupware Core IMAP/POP3 Gateway.
Sep 07 11:45:13 ucs systemd[1]: Started Kopano Groupware Core IMAP/POP3 Gateway.
Sep 07 11:45:13 ucs kopano-gateway[6604]: Starting kopano-gateway version 8.7.1
Sep 07 11:45:13 ucs kopano-gateway[6604]: Starting kopano-gateway version 8.7.1
Sep 07 12:14:14 ucs kopano-gateway[6604]: Client disconnected
Sep 07 12:14:14 ucs kopano-gateway[6604]: Client disconnected
Sep 07 12:35:39 ucs kopano-gateway[6604]: Client disconnected
Sep 07 12:37:00 ucs kopano-gateway[6604]: Client disconnected
Sep 07 12:37:00 ucs kopano-gateway[6604]: Client disconnected
Sep 07 13:05:42 ucs systemd[1]: Stopping Kopano Groupware Core IMAP/POP3 Gateway
Sep 07 13:05:42 ucs systemd[1]: Stopped Kopano Groupware Core IMAP/POP3 Gateway.
-- Reboot --
Sep 07 15:06:29 ucs systemd[1]: Started Kopano Groupware Core IMAP/POP3 Gateway.
Sep 07 15:06:30 ucs kopano-gateway[454]: Starting kopano-gateway version 8.7.1 (
Sep 07 15:06:30 ucs kopano-gateway[454]: Starting kopano-gateway version 8.7.1 (
Sep 07 13:11:38 ucs kopano-gateway[454]: Client disconnected
Sep 07 13:11:38 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:53:47 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:53:47 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:54:47 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:54:47 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:54:49 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:54:49 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:55:07 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:55:07 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:56:02 ucs kopano-gateway[454]: Client disconnected
Sep 07 15:56:02 ucs kopano-gateway[454]: Client disconnected

I’M such an ideot. I have to restart Kopano server

Nevermind. I don’t know if I’m to stupid, but if I set the Log-Level to 1 or to 6 and show in the log-file or run journalctl -u kopano-gateway, nothing happens :sweat: (And yes, I tried logging in bevore checking the Log)

Not kopano-server, but kopano-gateway would need to be restarted (reload would be enough btw) for this change to take effect.

Log File is still empty and log shows:

Sep 07 16:30:07 ucs systemd[1]: Reloading Kopano Groupware Core IMAP/POP3 Gatewa
Sep 07 16:30:07 ucs systemd[1]: Reloaded Kopano Groupware Core IMAP/POP3 Gateway
Sep 07 16:30:37 ucs kopano-gateway[454]: Client disconnected
Sep 07 16:30:37 ucs kopano-gateway[454]: Client disconnected

Btw (If I made a mistake there), the command I used was:

touch /var/log/kopano/server.log  
ucr set kopano/cfg/server/log_level=6 \
    kopano/cfg/server/log_method=file \
    kopano/cfg/server/log_file=/var/log/kopano/server.log

That is the logging of kopano-server, not kopano-gateway

and how can I set the Loging-Level of Kopano-gateway? :sweat_smile:

you have to replace server with gateway in your above snippet

Be aware that with any imap/pop3 client you have to use different login names on receive and send server connection as the sending server is the postfix mta on univention server and there you have to login with the email address as username and on kopano (for receiving, mailbox access) you have to use your ldap login name

rg
Christian

Okay, now we’re talking. It says something to me :heart_eyes:
I don’t know what it means, but here it is:

Sep 08 09:04:43 ucs systemd[1]: Reloading Kopano Groupware Core IMAP/POP3 Gateway.
Sep 08 09:04:43 ucs systemd[1]: Reloaded Kopano Groupware Core IMAP/POP3 Gateway.
Sep 08 09:04:43 ucs kopano-gateway[454]: Reloaded SSL context
Sep 08 09:04:43 ucs kopano-gateway[454]: Log connection was reset
Sep 08 09:05:12 ucs kopano-gateway[454]: Accepted connection from [::ffff:192.168.77.61]:61030
Sep 08 09:05:12 ucs kopano-gateway[454]: Starting worker thread for IMAP request
Sep 08 09:05:12 ucs kopano-gateway[454]: > * OK [CAPABILITY IMAP4rev1 LITERAL+ STARTTLS AUTH=PLAIN] IMAP gateway ready
Sep 08 09:05:12 ucs kopano-gateway[454]: Accepted connection from [::ffff:192.168.77.61]:61031
Sep 08 09:05:12 ucs kopano-gateway[454]: Starting worker thread for POP3 request
Sep 08 09:05:12 ucs kopano-gateway[454]: Accepted connection from [::ffff:192.168.77.61]:61032
Sep 08 09:05:12 ucs kopano-gateway[454]: Starting worker thread for IMAP request
Sep 08 09:05:12 ucs kopano-gateway[454]: +OK POP3 gateway ready
Sep 08 09:05:12 ucs kopano-gateway[454]: Accepted connection from [::ffff:192.168.77.61]:61033
Sep 08 09:05:12 ucs kopano-gateway[454]: Starting worker thread for POP3 request
Sep 08 09:05:12 ucs kopano-gateway[454]: > * OK [CAPABILITY IMAP4rev1 LITERAL+ STARTTLS AUTH=PLAIN] IMAP gateway ready
Sep 08 09:05:12 ucs kopano-gateway[454]: +OK POP3 gateway ready
Sep 08 09:05:12 ucs kopano-gateway[454]: < 1 CAPABILITY
Sep 08 09:05:12 ucs kopano-gateway[454]: > * CAPABILITY IMAP4rev1 LITERAL+ STARTTLS AUTH=PLAIN CHILDREN XAOL-OPTION NAMESPACE QUOTA IDLE
Sep 08 09:05:12 ucs kopano-gateway[454]: > 1 OK CAPABILITY Completed
Sep 08 09:05:12 ucs kopano-gateway[454]: < 1 CAPABILITY
Sep 08 09:05:12 ucs kopano-gateway[454]: > * CAPABILITY IMAP4rev1 LITERAL+ STARTTLS AUTH=PLAIN CHILDREN XAOL-OPTION NAMESPACE QUOTA IDLE
Sep 08 09:05:12 ucs kopano-gateway[454]: Command received: CAPA
Sep 08 09:05:12 ucs kopano-gateway[454]: [64B blob data]
Sep 08 09:05:12 ucs kopano-gateway[454]: Command received: QUIT
Sep 08 09:05:12 ucs kopano-gateway[454]: +OK Bye
Sep 08 09:05:12 ucs kopano-gateway[454]: Disconnecting client.
Sep 08 09:05:12 ucs kopano-gateway[454]: Client [::ffff:192.168.77.61]:61031 thread exiting
Sep 08 09:05:12 ucs kopano-gateway[454]: > 1 OK CAPABILITY Completed
Sep 08 09:05:12 ucs kopano-gateway[454]: < 2 LOGOUT
Sep 08 09:05:12 ucs kopano-gateway[454]: > * BYE server logging out
Sep 08 09:05:12 ucs kopano-gateway[454]: > 2 OK LOGOUT completed
Sep 08 09:05:12 ucs kopano-gateway[454]: Disconnecting client.
Sep 08 09:05:12 ucs kopano-gateway[454]: Client [::ffff:192.168.77.61]:61032 thread exiting
Sep 08 09:05:12 ucs kopano-gateway[454]: Command received: CAPA
Sep 08 09:05:12 ucs kopano-gateway[454]: [64B blob data]
Sep 08 09:05:12 ucs kopano-gateway[454]: Command received: QUIT
Sep 08 09:05:12 ucs kopano-gateway[454]: +OK Bye
Sep 08 09:05:12 ucs kopano-gateway[454]: Disconnecting client.
Sep 08 09:05:12 ucs kopano-gateway[454]: Client [::ffff:192.168.77.61]:61033 thread exiting
Sep 08 09:05:12 ucs kopano-gateway[454]: < 2 LOGOUT
Sep 08 09:05:12 ucs kopano-gateway[454]: > * BYE server logging out
Sep 08 09:05:12 ucs kopano-gateway[454]: > 2 OK LOGOUT completed
Sep 08 09:05:12 ucs kopano-gateway[454]: Disconnecting client.
Sep 08 09:05:12 ucs kopano-gateway[454]: Client [::ffff:192.168.77.61]:61030 thread exiting
Sep 08 09:05:14 ucs kopano-gateway[454]: Accepted connection from [::ffff:192.168.77.61]:61038
Sep 08 09:05:14 ucs kopano-gateway[454]: Starting worker thread for IMAP request
Sep 08 09:05:14 ucs kopano-gateway[454]: > * OK [CAPABILITY IMAP4rev1 LITERAL+ STARTTLS AUTH=PLAIN] IMAP gateway ready
Sep 08 09:05:14 ucs kopano-gateway[454]: < 1 STARTTLS
Sep 08 09:05:14 ucs kopano-gateway[454]: > 1 OK Begin TLS negotiation now
Sep 08 09:05:14 ucs kopano-gateway[454]: Using SSL now
Sep 08 09:05:14 ucs kopano-gateway[454]: Client disconnected
Sep 08 09:05:14 ucs kopano-gateway[454]: Client [::ffff:192.168.77.61]:61038 thread exiting
Sep 08 09:05:14 ucs kopano-gateway[454]: Accepted connection from [::ffff:192.168.77.61]:61039
Sep 08 09:05:14 ucs kopano-gateway[454]: Starting worker thread for IMAP request
Sep 08 09:05:14 ucs kopano-gateway[454]: > * OK [CAPABILITY IMAP4rev1 LITERAL+ STARTTLS AUTH=PLAIN] IMAP gateway ready
Sep 08 09:05:14 ucs kopano-gateway[454]: < 1 STARTTLS
Sep 08 09:05:14 ucs kopano-gateway[454]: > 1 OK Begin TLS negotiation now
Sep 08 09:05:14 ucs kopano-gateway[454]: Using SSL now
Sep 08 09:05:14 ucs kopano-gateway[454]: Client disconnected
Sep 08 09:05:14 ucs kopano-gateway[454]: Client [::ffff:192.168.77.61]:61039 thread exiting

Does this help?

I tried combinations: doesn’t work either :expressionless:

After reading those lines, I tried logging in without ssl and it worked. How can I use ssl now?
(Without SSL, the Server won’t send any mail)

At least in my test environment it also logged that it started a thread for IMAPS, when doing the connection test from Thunderbird.

Normally SSL is automatically set up during app installation. Is kopano-gateway listening on port 993?

No, it did not. But I installed it normally throught the Univention App-Center

Okay, I now used Outlook and manually set the Ports to 993 for IMAP and 465 for SMTP

But it stops while createing the IMAPs-Thread:

Sep 08 15:38:48 ucs kopano-gateway[454]: Accepted connection from [::ffff:192.168.77.61]:52799
Sep 08 15:38:48 ucs kopano-gateway[454]: Starting worker thread for IMAPs request

Edit:
After cancel the process in Outlook, the Log sows:

Sep 08 15:38:48 ucs kopano-gateway[454]: Starting worker thread for IMAPs request
Sep 08 15:47:30 ucs kopano-gateway[454]: ECChannel::HrEnableTLS(): SSL_accept failed: 5
Sep 08 15:47:30 ucs kopano-gateway[454]: Unable to negotiate SSL connection
Sep 08 15:47:30 ucs kopano-gateway[454]: Client [::ffff:192.168.77.61]:52799 thread exiting

In that case I would recommend to get in touch with the Kopano support so that someone could have a look at your system.

Okay, thank you verry much for your time.

PS: its quite easy to test imap connections with curl, e.g. curl --insecure -v imaps://192.168.178.152 --user "xena:univention"

Mastodon