Kopano-gateway missing

Hi@all,

ic use the current version Kopano Core: 8.7.16 under UCS 4.4-5

For testing purposes, I have activated IMAP access for one user (user management -> Kopano).

On the server, however, I cannot find the kopano-gateway service

root@com01:~# ls -la /var/run/kopano
Total 24
drwxrwxr-x 2 kopano kopano 300 Aug 12 09:24 .
drwxr-xr-x 33 root root 1220 Aug 12 11:25 .
-rw-rw-rw- 2 kopano kopano 0 Aug 12 09:24 com01.223ed700-714
-rw-rw-rw- 2 kopano amavis 0 Aug 12 09:24 com01.be762700-722
-rw------- 1 kopano kopano 5 Aug 12 09:24 dagent.pid
-rw-r--r-- 1 kopano kopano 4 Aug 12 09:24 monitor.pid
srw-rw---- 1 kopano kopano 0 Aug 12 09:24 prio.sock
-rw-r--r-- 1 kopano kopano 4 Aug 12 09:24 search.pid
-rw-rw-rw- 2 kopano kopano 0 Aug 12 09:24 search.pid.lock
srwx------ 1 kopano kopano 0 Aug 12 09:24 search.sock
-rw-r--r-- 1 kopano kopano 5 Aug 12 09:24 server.pid
srw-rw-rw- 1 kopano kopano 0 Aug 12 09:24 server.sock
-rw-r--r-- 1 kopano amavis 4 Aug 12 09:24 spamd.pid
-rw-rw-rw- 2 kopano amavis 0 Aug 12 09:24 spamd.pid.lock
-rw------- 1 kopano kopano 4 Aug 12 09:24 spooler.pid

and when I try to start it (TAB extension) it does not appear:

root@com01:~# service kopano-
kopano-dagent kopano-ical kopano-monitor kopano-search kopano-server kopano-spamd kopano-spooler  
root@com01:~# service kopano-

Also I cannot find an IMAP port:

root@com01:~# netstat -tulps
Active Internet connections (Server only)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name    
tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN 0 1625 1488/perl           
tcp 0 0 127.0.0.1:44239 0.0.0.0:* LISTEN 0 1606 1079/containererd     
tcp 0 0.0.0.0:111 0.0.0.0:* LISTS 0 9893 703/rpcbind         
tcp 0 0.0.0.0:465 0.0.0.0:* LISTS 0 27056 1688/master         
tcp 0 0 127.0.0.1:2003 0.0.0.0:* LISTEN 0 23388 1076/kopano-dagent  
tcp 0 0.0.0.0:22 0.0.0.0:* LISTS 0 10894 1083/sshd           
tcp 0 0.0.0.0:25 0.0.0.0:* LISTS 0 27053 1688/master         
tcp 0 0 127.0.0.1:8090 0.0.0.0:* LISTS 0 27279 2435/python2.7      
tcp 0 0 0.0.0.0:8095 0.0.0.0:* LISTEN 0 29970 2517/python2.7      
tcp 0 0 0.0.0.0:32767 0.0.0.0:* LISTEN 0 15799 1085/rpc.mountd     
tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTS 0 15848 -                   
tcp 0 0.0.0.0:2049 0.0.0.0:* LISTS 0 13838 -                   
tcp 0 0.0.0.0:5666 0.0.0.0:* LISTEN 112 23615 1140/nrpe           
tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTS 119 26132 1765/amavisd-new (m 
tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTS 0 14129 1688/master         
tcp 0 0.0.0.0:3306 0.0.0.0:* LISTS 115 24781 1337/mysqld         
tcp 0 0.0.0.0:587 0.0.0.0:* LISTS 0 27059 1688/master         
tcp6 0 0 :::237 :::* LISTEN 0 27778 1764/kopano-server  
tcp6 0 0 :::6670 :::* LISTEN 0 25119 914/python2.7       
tcp6 0 0 ::1:783 :::* LISTEN 0 1623 1488/perl           
tcp6 0 0 :::111 :::* LISTEN 0 9896 703/rpcbind         
tcp6 0 0 :::80 :::* LISTEN 0 28820 2515/apache2        
tcp6 0 0 :::22 :::* LISTEN 0 10896 1083/sshd           
tcp6 0 0 :::443 :::* LISTEN 0 28816 2515/apache2        
tcp6 0 0 :::8095 :::* LISTEN 0 29969 2517/python2.7      
tcp6 0 0 :::32767 :::* LISTEN 0 15803 1085/rpc.mountd     
tcp6 0 0 :::32768 :::* LISTEN 0 15850 -                   
tcp6 0 0 :::2049 ::

but the package is installed:

root@com01:~# apt search kopano-gateway
Sort... Done
Full text search... Ready
kopano-gateway/stable,now 8.7.16.0-0+40.1 amd64 [Installed,automatic]
  POP3 and IMAP Gateway for Kopano Core

kopano-gateway-dbgsym/stable 8.7.16.0-0+40.1 amd64
  Debug symbols for kopano-gateway

what am I doing wrong?

with best
sven

Hi @pixel,

I just tried on a fresh clone and for me gateway works.

root@ucs-1555:~# dpkg -l | grep kopano-gateway
ii  kopano-gateway                                      8.7.16.0-0+40.1                                                     amd64        POP3 and IMAP Gateway for Kopano Core
root@ucs-1555:~# service kopano-gateway status
● kopano-gateway.service - Kopano Groupware Core IMAP/POP3 Gateway
   Loaded: loaded (/lib/systemd/system/kopano-gateway.service; enabled; vendor p
   Active: active (running) since Wed 2020-08-12 13:27:33 CEST; 3min 51s ago
     Docs: man:kopano-gateway(8)
           man:kopano-gateway.cfg(5)
 Main PID: 16791 (kopano-gateway)
    Tasks: 1 (limit: 4915)
   Memory: 1.9M
      CPU: 32ms
   CGroup: /system.slice/kopano-gateway.service
           └─16791 /usr/sbin/kopano-gateway -F

Aug 12 13:27:33 ucs-1555 systemd[1]: Stopped Kopano Groupware Core IMAP/POP3 Gat
Aug 12 13:27:33 ucs-1555 systemd[1]: Started Kopano Groupware Core IMAP/POP3 Gat
Aug 12 13:27:33 ucs-1555 kopano-gateway[16791]: Starting kopano-gateway version 
Aug 12 13:27:33 ucs-1555 kopano-gateway[16791]: Starting kopano-gateway version
root@ucs-1555:~# univention-app info
UCS: 4.4-4 errata698
Installed: kopano-core=8.7.1.0-1 kopano-webapp=3.5.14.2539 kopano-webmeetings=3.0.1.100 univention-demo-data=2.1.0-1 4.3/kopano-meet=2.1.0_0-3 4.3/openid-connect-provider=2.0-konnect-0.33.3 4.3/owncloud=10.4.1
Upgradable: kopano-webapp kopano-webmeetings kopano-meet

Hi @pixel!
You should also check that you’ve

disabled_features = ""

settings line in your /etc/kopano/server.cfg after that IMAP access to Kopano should work.

P.S. I’ve misunderstood your issue, but anyway above setup is mandatory in order to make kopano-gateway work

I would not recommend this as it enables IMAP for all users (and also increases storage requirements as this will store imap optimised messages for all users. The recommended way (and also what @pixel already mentioned in his post) is to enable IMAP only for the users that require it. This can be done from the UCS user management.

Edit: on top of that configuration changes should be done through the UCR and not directly in the config files.

1 Like

Sorry for offtopic @fbartels, but is that overhead significant comparing with “pure” Web and/or z-push access?

@pixel, show output of the systemctl status kopano-gateway command, please.

It’s at least twice, since the full RFC message (including attachments) needs to be stored again.

1 Like

ok, the package is installed

root@com01:~# dpkg -l | grep kopano-gateway
ii  kopano-gateway                                      8.7.16.0-0+40.1                                                     amd64        POP3 and IMAP Gateway for Kopano Core

yeah, that’s how I did it. I did not change anything in the configuration file

here’s the problem

● kopano-gateway.service - Kopano Groupware Core IMAP/POP3 Gateway
   Loaded: loaded (/lib/systemd/system/kopano-gateway.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2020-08-13 06:33:22 CEST; 4h 7min ago
     Docs: man:kopano-gateway(8)
           man:kopano-gateway.cfg(5)
  Process: 1076 ExecStart=/usr/sbin/kopano-gateway -F (code=exited, status=1/FAILURE)
 Main PID: 1076 (code=exited, status=1/FAILURE)
      CPU: 14ms

Aug 13 06:33:22 com01 systemd[1]: Started Kopano Groupware Core IMAP/POP3 Gateway.
Aug 13 06:33:22 com01 kopano-gateway[1076]: [crit   ] Config error: Unknown option "pop3s_enable" found!
Aug 13 06:33:22 com01 kopano-gateway[1076]: /usr/sbin/kopano-gateway: Startup failed: call failed (80004005). Please check the logfile () for details.
Aug 13 06:33:22 com01 systemd[1]: kopano-gateway.service: Main process exited, code=exited, status=1/FAILURE
Aug 13 06:33:22 com01 systemd[1]: kopano-gateway.service: Unit entered failed state.
Aug 13 06:33:22 com01 systemd[1]: kopano-gateway.service: Failed with result 'exit-code'.

This option is set via UCR

kopano/cfg/gateway/pop3s_enable=yes

This topic was mentioned back in the Kopano Groupware Core 8.7.0 announcement:

https://forum.kopano.io/topic/2110/kopano-groupware-core-8-7-final-available

When upgrading from our repositories on UCS you will notice that because of the above mentioned configuration file changes kopano-gateway and kopano-ical will refuse to start. The integration package already provided an upgrade script for this case within the 8.6.8 upgrade, which can be found at /usr/share/kopano4ucs/kopano4ucs-update-settings870.sh .

ok, I have executed the script and now kopano-gateway is running.
But after a reboot I can’t find an IMAP port under IPv4.

root@com01:~# netstat -tulpen
Aktive Internetverbindungen (Nur Server)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       Benutzer   Inode      PID/Program name    
tcp        0      0 0.0.0.0:5666            0.0.0.0:*               LISTEN      112        18301      1193/nrpe           
tcp        0      0 127.0.0.1:10024         0.0.0.0:*               LISTEN      119        19191      1812/amavisd-new (m 
tcp        0      0 127.0.0.1:10025         0.0.0.0:*               LISTEN      0          24733      1709/master         
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      115        18408      1329/mysqld         
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      0          19046      1709/master         
tcp        0      0 127.0.0.1:783           0.0.0.0:*               LISTEN      0          23845      1420/perl           
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      0          22854      728/rpcbind         
tcp        0      0 0.0.0.0:465             0.0.0.0:*               LISTEN      0          19043      1709/master         
tcp        0      0 127.0.0.1:38515         0.0.0.0:*               LISTEN      0          12157      1092/containerd     
tcp        0      0 127.0.0.1:2003          0.0.0.0:*               LISTEN      0          13903      1079/kopano-dagent  
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          13989      1107/sshd           
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      0          19040      1709/master         
tcp        0      0 127.0.0.1:8090          0.0.0.0:*               LISTEN      0          28888      2299/python2.7      
tcp        0      0 0.0.0.0:8095            0.0.0.0:*               LISTEN      0          30108      2531/python2.7      
tcp        0      0 0.0.0.0:32767           0.0.0.0:*               LISTEN      0          11021      1096/rpc.mountd     
tcp        0      0 0.0.0.0:32768           0.0.0.0:*               LISTEN      0          1617       -                   
tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN      0          23693      -                   
tcp6       0      0 :::5666                 :::*                    LISTEN      112        18302      1193/nrpe           
tcp6       0      0 :::995                  :::*                    LISTEN      0          11916      1075/kopano-gateway 
tcp6       0      0 :::236                  :::*                    LISTEN      0          23977      1760/kopano-server  
tcp6       0      0 :::237                  :::*                    LISTEN      0          23982      1760/kopano-server  
tcp6       0      0 :::6670                 :::*                    LISTEN      0          27296      934/python2.7       
tcp6       0      0 :::110                  :::*                    LISTEN      0          11911      1075/kopano-gateway 
tcp6       0      0 ::1:783                 :::*                    LISTEN      0          23843      1420/perl           
tcp6       0      0 :::143                  :::*                    LISTEN      0          11921      1075/kopano-gateway 
tcp6       0      0 :::111                  :::*                    LISTEN      0          22857      728/rpcbind         
tcp6       0      0 :::8080                 :::*                    LISTEN      0          16362      1078/kopano-ical    
tcp6       0      0 :::80                   :::*                    LISTEN      0          17301      2529/apache2        
tcp6       0      0 :::22                   :::*                    LISTEN      0          13991      1107/sshd           
tcp6       0      0 :::8443                 :::*                    LISTEN      0          16367      1078/kopano-ical    
tcp6       0      0 :::443                  :::*                    LISTEN      0          17297      2529/apache2        
tcp6       0      0 :::8095                 :::*                    LISTEN      0          30107      2531/python2.7      
tcp6       0      0 :::32767                :::*                    LISTEN      0          11025      1096/rpc.mountd     
tcp6       0      0 :::32768                :::*                    LISTEN      0          1619       -                   
tcp6       0      0 :::2049                 :::*                    LISTEN      0          1614       -                   
tcp6       0      0 :::993                  :::*                    LISTEN      0          11926      1075/kopano-gateway 
udp        0      0 0.0.0.0:32767           0.0.0.0:*                           0          11019      1096/rpc.mountd     
udp        0      0 0.0.0.0:32768           0.0.0.0:*                           0          1616       -                   
udp        0      0 0.0.0.0:111             0.0.0.0:*                           0          12694      728/rpcbind         
udp        0      0 192.168.24.6:123        0.0.0.0:*                           0          26223      2112/ntpd           
udp        0      0 127.0.0.1:123           0.0.0.0:*                           0          26221      2112/ntpd           
udp        0      0 0.0.0.0:123             0.0.0.0:*                           0          26217      2112/ntpd           
udp        0      0 0.0.0.0:904             0.0.0.0:*                           0          22853      728/rpcbind         
udp        0      0 0.0.0.0:2049            0.0.0.0:*                           0          1613       -                   
udp6       0      0 :::32767                :::*                                0          11023      1096/rpc.mountd     
udp6       0      0 :::32768                :::*                                0          1618       -                   
udp6       0      0 :::111                  :::*                                0          22855      728/rpcbind         
udp6       0      0 fe80::dc80:fff:fe57:123 :::*                                0          26227      2112/ntpd           
udp6       0      0 ::1:123                 :::*                                0          26225      2112/ntpd           
udp6       0      0 :::123                  :::*                                0          26214      2112/ntpd           
udp6       0      0 :::904                  :::*                                0          22856      728/rpcbind         
udp6       0      0 :::2049                 :::*                                0          1615       -

How is IMAP/SMTP connected? SSL or TLS? With which ports?

When something is listening in the IPv6 address it is usually also available via IPv4. Kopano-Gateway is using the commonly used ports for these services.

1 Like

Hi @fbartels!

Is there the same data duplication for kopano-server in kopano DB present, while syncing data from some IMAP server to kopano-server using imapsync for example?

as far as I know yes

Got it!

Thank you for a quick response.

@fbartels even though at the first glance on Kopano Core sources, that seems you are wrong.
Same method is here
Data is converted on the fly, isn’t it?
As far as I understand all needed functionality for it implemented in inetmapi.cpp.

Where I’m mistaken? :slight_smile:

Yes, as far as I know this is the case, but at least in the past the converted message as immediately stored to prevent another conversion the next time the object is requested.

But I am not a developer so there may be nuances that I am missing.

If you want to learn more I would suggest to get in direct contact with our support.

I see and I’ve already ask Jan Engelhardt on Kopano forum.
OpenSource things must be really Open :wink:
Looking forward for his reply…

Mastodon