kopano-server.8 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. '\" t
  2. .\" Title: kopano-server
  3. .\" Author: [see the "Author" section]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
  5. .\" Date: November 2016
  6. .\" Manual: Kopano Core user reference
  7. .\" Source: Kopano 8
  8. .\" Language: English
  9. .\"
  10. .TH "KOPANO\-SERVER" "8" "November 2016" "Kopano 8" "Kopano Core user reference"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. kopano-server \- Start the Kopano storage server\&.
  32. .SH "SYNOPSIS"
  33. .HP \w'\fBkopano\-server\fR\ 'u
  34. \fBkopano\-server\fR [\fIOPTION\fR]
  35. .SH "DESCRIPTION"
  36. .PP
  37. The kopano\-server is the Zafara storage server\&. It contacts a database server and provides services to Kopano clients\&. The user base can be retrieved from an external source, like LDAP, or can be setup with a separate list of users\&.
  38. .PP
  39. After starting, the server keeps listening for connections on the configured TCP port and/or Unix socket\&.
  40. .SH "OPTIONS"
  41. .PP
  42. The storage server program takes the following configuration options:
  43. .PP
  44. \fB\-\-config\fR, \fB\-c\fR \fIfile\fR
  45. .RS 4
  46. Specify the location of the configuration file\&.
  47. .sp
  48. Default:
  49. \fI/etc/kopano/server\&.cfg\fR
  50. .RE
  51. .PP
  52. \fB\-\-foreground\fR, \fB\-F\fR
  53. .RS 4
  54. Run in the foreground\&. Normally the server will daemonize and run in the background\&.
  55. .RE
  56. .PP
  57. \fB\-\-restart\-searches\fR, \fB\-R\fR
  58. .RS 4
  59. Rebuild all search folders\&. This may take some time and is only needed when your search folders have become out\-of\-sync with the actual data in the database\&. The sync will start synchronously at the start of the server, and you will have to wait for all searches to complete before connecting to the server\&.
  60. .RE
  61. .PP
  62. \fB\-\-ignore\-database\-version\-conflict\fR
  63. .RS 4
  64. Ignore version information from the database\&. Kopano will normally not start the server if the database has a newer version than the kopano\-server binary\&. This makes sure you cannot downgrade your server binary while keeping the same database\&. If you know what you\*(Aqre doing, you can use this option to bypass the start\-up version check of the database\&.
  65. .RE
  66. .PP
  67. \fB\-\-ignore\-attachment\-storage\-conflict\fR
  68. .RS 4
  69. Override the attachment storage option from the configuration file\&. When you change the option of the location where to store attachments after you\*(Aqve already started the kopano\-server once, this location will conflict\&. Attachments will not be found when they are stored in a different location\&.
  70. .RE
  71. .PP
  72. \fB\-\-override\-multiserver\-lock\fR
  73. .RS 4
  74. When you upgrade/downgrade from/to multiserver setups, the server will not start, because of database differences\&. If you know what you\*(Aqre doing, and want to circumvent this and start the server anyway, you can use this option\&.
  75. .RE
  76. .PP
  77. \fB\-\-force\-database\-upgrade\fR
  78. .RS 4
  79. Forcing the kopano\-server do the normal upgrade as usual\&. The server will only daemonize when the upgrade is complete\&. Simple progress can be followed in the log output of the server\&.
  80. .RE
  81. .PP
  82. \fB\-V\fR
  83. .RS 4
  84. Print the version and exit\&.
  85. .RE
  86. .PP
  87. When invoked with no options, the server will search for a configuration file in
  88. /etc/kopano/server\&.cfg\&. If no configuration file is found, default values are used\&. See
  89. \fBkopano-server.cfg\fR(5)
  90. for all configuration options and their default values\&.
  91. .SH "USAGE"
  92. .PP
  93. Starting the server with an alternative configuration:
  94. .PP
  95. \fBkopano\-server\fR
  96. \fB\-c\fR
  97. \fI/path/to/server\&.cfg\fR
  98. .PP
  99. You may also use the init\&.d scripts:
  100. .PP
  101. \fB/etc/init\&.d/kopano\-server\fR
  102. [\fIstart\fR|
  103. \fIstop\fR|
  104. \fIrestart\fR]
  105. .SH "FILES"
  106. .PP
  107. /etc/kopano/server\&.cfg
  108. .RS 4
  109. The server configuration file\&.
  110. .RE
  111. .PP
  112. Configuration options for user plugins are in their respective configuration file\&. The name of these files is set in the server\&.cfg file\&. See
  113. \fBkopano-server.cfg\fR(5)
  114. for information on the server\&.cfg settings\&.
  115. .SH "DIAGNOSTICS"
  116. .PP
  117. If you run into problems, check the log for any errors\&. If you made a mistake in the configuration of the log method, this will be reported on standard error\&. You can also restart the server with a higher log level\&. Also, before starting the server, always make sure the database server is running at the right location and no other server is listening on the configured TCP port\&.
  118. .PP
  119. For extended diagnostics, there are special extended log options available for enhanced debugging capabilities\&. The parameter
  120. \fIlog_level\fR
  121. has special or\-ed values which can be set to investigate different modules within the server process:
  122. .PP
  123. SQL: 0x00010000, User backend: 0x00020000, Server cache: 0x00040000, SOAP: 0x00100000, ICS: 0x00200000
  124. .PP
  125. For example, if you are using LDAP as the user plugin, you can set the
  126. \fIlog_level\fR
  127. to 0x00020006 for extended LDAP logging (the last digit 6 enables extended verbose logging)\&. To enable SQL and LDAP logging at the same time, set
  128. \fIlog_level\fR
  129. to 0x00030006
  130. .PP
  131. WARNING: The log options create huge amounts of log entries in production environments, this results in abnormal large logfiles which can fill up available disk space very fast\&. Only use this with extreme caution\&.
  132. .SH "SECURITY"
  133. .PP
  134. The normal way for user clients to connect to the server is over TCP, either direct using the Kopano port, or over HTTP when Apache is setup as a proxy\&. Users can only login with their username and password\&.
  135. .PP
  136. The normal way for admin clients, like the spooler and admin tool, to connect to the server is through the Unix socket on Unix type servers\&. The admin clients are able to login when they are run as root or as the user the storage server process is running as\&. Most of the time this will be root only, since the storage server process runs as root by default\&.
  137. .PP
  138. As an exception for the dagent, a unix user can also connect to its own store without a password\&. Any other store cannot be accessed this way\&.
  139. .PP
  140. Direct SSL connections are also possible\&. The server needs to be configured to accept SSL connections on a new port\&. Login via an SSL key is also possible\&. Please read the next section on how to setup SSL\&.
  141. .SH "SSL"
  142. .PP
  143. To accept SSL connections directly by the server, the storage server will need to listen on a different port to separate the normal connections from the encrypted connections\&. This is set in the
  144. \fIserver_ssl_port\fR
  145. setting in the configuration file\&.
  146. .PP
  147. Then, you must setup a signed SSL certificate\&. First, we\*(Aqll create a Certificate Authority to be able to sign certificate requests\&. We provide a script which makes it easy to create certificates on any distribution\&. This script is located in /usr/share/kopano, called ssl\-certificate\&.sh\&. Enter the following commands to create a certificate for the Kopano server\&.
  148. .PP
  149. \fB mkdir \-p /etc/kopano/ssl \fR
  150. \fB cd /etc/kopano/ssl \fR
  151. \fB sh /usr/share/kopano/ssl\-certificate\&.sh server \fR
  152. .PP
  153. Press enter twice to start the creation of a new CA, probably called demoCA\&. Enter a password when asked for\&. This is the password later used to sign certificate requests\&. Then enter your certificate information\&. Do not leave the Common Name field blank, otherwise the creation will fail\&. A good example for the Common Name field is your hostname\&.
  154. .PP
  155. Now that we have a CA, we can create self\-signed certificates\&. The script will automatically start the creation of this certificate\&. The CA certificate must be set in the server\&.cfg file in the
  156. \fIserver_ssl_ca_file\fR
  157. setting\&. We need a signed certificate for the server to start with SSL support\&.
  158. .PP
  159. Enter a password for the request, and enter the certificate details\&. Some details need to be different from what you typed when creating the CA\&. Type at least a different name in the \*(AqOrganizational Unit Name\*(Aq field\&. The challenge password at the end may be left empty\&.
  160. .PP
  161. The script will automatically continue with signing this certificate request\&. You will need to enter your CA certificate password again to sign this request\&. Then you must accept the new certificate into the CA\&.
  162. .PP
  163. After accepting, a new signed certificate is created, with the name server\&.pem\&. This file contains the private key, so keep this file safe\&.
  164. .PP
  165. The script will ask if a public key should also be created\&. Since we\*(Aqre creating the certificate for the server, this is not needed\&. So enter \*(Aqn\*(Aq and press enter\&.
  166. .PP
  167. The server\&.pem file should be set in the server\&.cfg file in the
  168. \fIserver_ssl_key_file\fR
  169. option\&. See
  170. \fBkopano-server.cfg\fR(5)
  171. for information on the possible SSL settings\&. The password of this key needs to be set in the
  172. \fIserver_ssl_key_pass\fR
  173. option\&. Do not forget this password in the server\&.cfg file, otherwise the kopano\-server program will ask for this password when an SSL connection is accepted\&.
  174. .PP
  175. To create a new certificate for a client service, run the script again\&. You can create one new certificate for all clients, or separate certificates for each client\&.
  176. .PP
  177. \fB sh /usr/share/kopano/ssl\-certificates\&.sh \fR
  178. .PP
  179. When typing the certificate information, type at least a different \*(AqOrganizational Unit Name\*(Aq field\&. When asked for a public key, type \*(Aqy\*(Aq and enter to create the public key\&.
  180. .PP
  181. Install the new service\&.pem on the server that will be logging in\&. Install the service\-public\&.pem file in the /etc/kopano/sslkeys directory:
  182. .PP
  183. \fB mkdir /etc/kopano/sslkeys \fR
  184. \fB mv service\-public\&.pem /etc/kopano/sslkeys \fR
  185. .PP
  186. The remote service, which has the service\&.pem private key, can now login with the certificate, because the known public key matches\&.
  187. .SH "ADDRESSBOOK SORTING"
  188. .PP
  189. With special chars (like umlauts) the sorting is working more the dictionary way according to DIN 5007\-1, section 6\&.1\&.1\&.4\&.1\&. Depending on the behaviour wanted, the collation setting can be changed with the (not per default included) parameter
  190. \fI default_sort_locale_id\fR\&. When setting this parameter to de_DE@collation=phonebook for example the sorting will be oriented to the DIN 5007\-2, section 6\&.1\&.1\&.4\&.2 standard which is rather used in phonebooks and actually decomposes umlauts for sorting inline within non\-umlaut based ASCII characters\&.
  191. .SH "SIGNALS"
  192. .PP
  193. The following signals can be sent to the storage server process:
  194. .PP
  195. \fBHUP\fR
  196. .RS 4
  197. When the HUP signal is received, some options from the configuration file are reloaded\&. The reloadable options are listed in the
  198. \fBkopano-server.cfg\fR(5)
  199. manual page\&.
  200. .sp
  201. Also, when using
  202. \fIlog_method = file\fR, the logfile will be closed and a new logfile will be opened\&. You can use this signal in your logrotate system\&.
  203. .RE
  204. .PP
  205. \fBTERM\fR
  206. .RS 4
  207. To gracefully let the server exit, the normal TERM signal is used\&. Because of open sessions by clients it may take up to 60 seconds for the server to completely shutdown\&.
  208. .RE
  209. .SH "AUTHOR"
  210. .PP
  211. Written by Kopano\&.
  212. .SH "SEE ALSO"
  213. .PP
  214. \fBkopano-server.cfg\fR(5),
  215. \fBkopano-admin\fR(8)