kopano-gateway.cfg.5 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. '\" t
  2. .\" Title: kopano-gateway.cfg
  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\-GATEWAY\&.CF" "5" "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-gateway.cfg \- The Kopano gateway configuration file
  32. .SH "SYNOPSIS"
  33. .PP
  34. \fBgateway\&.cfg\fR
  35. .SH "DESCRIPTION"
  36. .PP
  37. The
  38. gateway\&.cfg
  39. is a configuration file for the Kopano Gateway\&.
  40. gateway\&.cfg
  41. contains instructions for the software to set up the logging system and to enable or disable the POP3, POP3S, IMAP or IMAPS part of the service\&.
  42. .SH "FILE FORMAT"
  43. .PP
  44. The file consists of one big section, but parameters can be grouped by functionality\&.
  45. .PP
  46. The parameters are written in the form:
  47. .PP
  48. \fBname\fR
  49. =
  50. \fIvalue\fR
  51. .PP
  52. The file is line\-based\&. Each newline\-terminated line represents either a comment, nothing, a parameter or a directive\&. A line beginning with `#\*(Aq is considered a comment, and will be ignored by Kopano\&. Parameter names are case sensitive\&. Lines beginning with `!\*(Aq are directives\&.
  53. .PP
  54. Directives are written in the form:
  55. .PP
  56. !\fBdirective\fR
  57. \fI[argument(s)] \fR
  58. .PP
  59. The following directives exist:
  60. .PP
  61. \fBinclude\fR
  62. .RS 4
  63. Include and process
  64. \fIargument\fR
  65. .sp
  66. Example: !include common\&.cfg
  67. .RE
  68. .SH "EXPLANATION OF EACH PARAMETER"
  69. .PP
  70. \fBserver_bind\fR
  71. .RS 4
  72. IP address to bind to\&. Leave empty to bind to all addresses\&.
  73. .sp
  74. Default: (empty)
  75. .RE
  76. .PP
  77. \fBserver_hostname\fR
  78. .RS 4
  79. Hostname of the server to print to a client in the logon greeting\&. Leave empty to use DNS to find the hostname\&.
  80. .sp
  81. Default:
  82. .RE
  83. .PP
  84. \fBserver_hostname_greeting\fR
  85. .RS 4
  86. Whether to show the hostname in the logon greeting to clients\&. This config option is reloadable using the HUP signal\&.
  87. .sp
  88. Default:
  89. \fIno\fR
  90. .RE
  91. .PP
  92. \fBpop3_enable\fR
  93. .RS 4
  94. Enable POP3 service with value yes\&. All other values disable the service\&.
  95. .sp
  96. Default:
  97. \fIyes\fR
  98. .RE
  99. .PP
  100. \fBpop3_port\fR
  101. .RS 4
  102. The POP3 service will listen on this port for incoming connections\&.
  103. .sp
  104. Default:
  105. \fI110\fR
  106. .RE
  107. .PP
  108. \fBpop3s_enable\fR
  109. .RS 4
  110. Enable POP3S service with value yes\&. All other values disable the service\&.
  111. .sp
  112. Default:
  113. \fIyes\fR
  114. .RE
  115. .PP
  116. \fBpop3s_port\fR
  117. .RS 4
  118. The POP3S service will listen on this port for incoming connections\&.
  119. .sp
  120. Default:
  121. \fI995\fR
  122. .RE
  123. .PP
  124. \fBimap_enable\fR
  125. .RS 4
  126. Enable IMAP service with value yes\&. All other values disable the service\&.
  127. .sp
  128. Default:
  129. \fIyes\fR
  130. .RE
  131. .PP
  132. \fBimap_port\fR
  133. .RS 4
  134. The IMAP service will listen on this port for incoming connections\&.
  135. .sp
  136. Default:
  137. \fI143\fR
  138. .RE
  139. .PP
  140. \fBimaps_enable\fR
  141. .RS 4
  142. Enable IMAPS service with value yes\&. All other values disable the service\&.
  143. .sp
  144. Default:
  145. \fIyes\fR
  146. .RE
  147. .PP
  148. \fBimaps_port\fR
  149. .RS 4
  150. The IMAPS service will listen on this port for incoming connections\&.
  151. .sp
  152. Default:
  153. \fI993\fR
  154. .RE
  155. .PP
  156. \fBserver_socket\fR
  157. .RS 4
  158. The http address of the storage server\&.
  159. .sp
  160. Default:
  161. \fIhttp://localhost:236/\fR
  162. .sp
  163. It is not advised to specify the UNIX socket here, but the http address instead\&. In default configuration the gateway will then be trusted by the storage server (as set in its local_admin_users configuration setting)\&. Unless is run as an untrusted user, by specifying the
  164. \fBrun_as_user\fR, the gateway always authenticates users even if they provide no or wrong credentials!
  165. .RE
  166. .PP
  167. \fBrun_as_user\fR
  168. .RS 4
  169. After correctly starting, the gateway process will become this user, dropping root privileges\&. Note that the log file needs to be writeable by this user, and the directory too to create new logfiles after logrotation\&. This can also be achieved by setting the correct group and permissions\&.
  170. .sp
  171. Default value is empty, not changing the user after starting\&.
  172. .RE
  173. .PP
  174. \fBrun_as_group\fR
  175. .RS 4
  176. After correctly starting, the gateway process will become this group, dropping root privileges\&.
  177. .sp
  178. Default value is empty, not changing the group after starting\&.
  179. .RE
  180. .PP
  181. \fBpid_file\fR
  182. .RS 4
  183. Write the process ID number to this file\&. This is used by the init\&.d script to correctly stop/restart the service\&.
  184. .sp
  185. Default:
  186. \fI/var/run/kopano/gateway\&.pid\fR
  187. .RE
  188. .PP
  189. \fBrunning_path\fR
  190. .RS 4
  191. Change directory to this path when running in daemonize mode\&. When using the \-F switch to run in the foreground the directory will not be changed\&.
  192. .sp
  193. Default:
  194. \fI/\fR
  195. .RE
  196. .PP
  197. \fBprocess_model\fR
  198. .RS 4
  199. You can change the process model between
  200. \fIfork\fR
  201. and
  202. \fIthread\fR\&. The forked model uses somewhat more resources, but if a crash is triggered, this will only affect one user\&. In the threaded model, a crash means all users are affected, and will not be able to use the service\&.
  203. .sp
  204. Default:
  205. \fIfork\fR
  206. .RE
  207. .PP
  208. \fBbypass_auth\fR
  209. .RS 4
  210. This parameter can be used to skip password verification when connecting over the UNIX socket\&. Connecting through the UNIX socket can have a big performance gain, compared to the TCP socket of kopano-server\&. As kopano-gateway is usually running as the user kopano (which is a local_admin_user in kopano-server) this would normally mean that kopano-gateway would only verify usernames and no password (because its running as an administrator)\&. When set to \fIno\fR (default value) forces verification of passwords, even when running as an administrator\&. For migrations you will want to set \fIyes\fR\&.
  211. .sp
  212. Default:
  213. \fIno\fR
  214. .RE
  215. .PP
  216. \fBimap_only_mailfolders\fR
  217. .RS 4
  218. Enable the IMAP and IMAPS service to only show the mailfolders\&. This is the default behaviour\&. When this option is set to \*(Aqno\*(Aq, you will also be able to select you calendar and contacts and such\&. These views will not contain all information, since these items cannot be converted to a rfc\-822 mail item\&.
  219. .sp
  220. Default:
  221. \fIyes\fR
  222. .RE
  223. .PP
  224. \fBimap_public_folders\fR
  225. .RS 4
  226. Enable the IMAP and IMAPS service to also show the public store with subfolders\&. This is the default behaviour\&. When this option is set to \*(Aqno\*(Aq, IMAP clients will only see the users\*(Aq folder\&.
  227. .sp
  228. Default:
  229. \fIyes\fR
  230. .RE
  231. .PP
  232. \fBimap_capability_idle\fR
  233. .RS 4
  234. Allow IMAP clients to issue the IDLE command\&. When an IMAP client is idle, it may receive notifications from the server about changes of the selected folder\&. This may increase load on the server when many users are using the IMAP service\&.
  235. .sp
  236. Default:
  237. \fIyes\fR
  238. .RE
  239. .PP
  240. \fBimap_generate_utf8\fR
  241. .RS 4
  242. Normally e\-mails specify the correct charset for their contents\&. This may be altered to make it always UTF\-8\&. This will only happen on e\-mails that do not have the extra imap data properties, which is true for users without the \*(Aqimap\*(Aq feature enabled\&.
  243. .sp
  244. Default:
  245. \fIno\fR
  246. .RE
  247. .PP
  248. \fBimap_max_messagesize\fR
  249. .RS 4
  250. Limit the maximum message size (in bytes) which can be created by an IMAP client\&. The maximum of this value is 4GB although this is not recommended\&. If the value is too high it will cause a segmentation fault\&. This value may contain a k, m or g multiplier\&.
  251. .sp
  252. Default:
  253. \fI128M\fR
  254. .RE
  255. .PP
  256. \fBimap_expunge_on_delete\fR
  257. .RS 4
  258. Normally when you delete an e\-mail in an IMAP client, it will only be marked as deleted, and not removed from the folder\&. The client should send the EXPUNGE command to actually remove the item from the folder (where Kopano will place it in the soft\-delete system)\&. When this option is set to
  259. \fIyes\fR, the kopano\-gateway will issue the expunge command itself directly after a \*(Aqmark as delete\*(Aq command was received\&.
  260. .sp
  261. Default:
  262. \fIno\fR
  263. .RE
  264. .PP
  265. \fBimap_store_rfc822\fR
  266. .RS 4
  267. Store the rfc822 data with the message in MAPI\&. The Kopano Gateway stores the original rfc822 data of an APPENDed message in the database for later retrieval\&. This makes sure that the exact message that was delivered into the Kopano gateway is available for retrieval later, which is the behaviour when set to
  268. \fIyes\fR\&. If set to no, the kopano\-gateway will not store the original rfc822 text\&. This means that the rfc822 data must be re\-created when retrieved\&. This may cause changes in encoding or charset and some loss of fidelity\&. This will also invalidate any signatures in the stored messages\&.
  269. .sp
  270. Default:
  271. \fIyes\fR
  272. .RE
  273. .PP
  274. \fBimap_max_fail_commands\fR
  275. .RS 4
  276. Maximum of failed commands before forcibly closing connection of client\&. This makes sure that a client which does repeatedly fails on a specific connection (like opening folders over and over again which do not exist) does not affect the overall performance of the gateway process\&. With the default value set to
  277. \fI10\fR, normal operation will work for most productionenvironments\&. With IMAP migrations, this value should be set higher as many traditional IMAP migration tools try to fetch folders which do not necessarily exist before, so in a migration scenario this value should be set higher, at minimum to the number of folders to be migrated from the largest mailbox\&.
  278. .sp
  279. Default:
  280. \fI10\fR
  281. .RE
  282. .PP
  283. \fBdisable_plaintext_auth\fR
  284. .RS 4
  285. Disable all plaintext POP3 and IMAP authentications unless SSL/TLS is used (except for connections originating from localhost, to allow saslauthd with rimap)\&. Obviously, this requires at least
  286. \fIssl_private_key_file\fR
  287. and
  288. \fIssl_certificate_file\fR
  289. to take effect\&.
  290. .sp
  291. Default:
  292. \fIno\fR
  293. .RE
  294. .PP
  295. \fBssl_private_key_file\fR
  296. .RS 4
  297. The gateway will use this file as private key for SSL TLS\&. This file can be created with:
  298. \fBopenssl genrsa \-out /etc/kopano/gateway/privkey\&.pem 2048\fR\&.
  299. .sp
  300. Default:
  301. \fI/etc/kopano/gateway/privkey\&.pem\fR
  302. .RE
  303. .PP
  304. \fBssl_certificate_file\fR
  305. .RS 4
  306. The gateway will use this file as certificate for SSL TLS\&. A self\-signed certificate can be created with:
  307. \fBopenssl req \-new \-x509 \-key /etc/kopano/gateway/privkey\&.pem \-out /etc/kopano/gateway/cert\&.pem \-days 1095\fR\&.
  308. .sp
  309. Default:
  310. \fI/etc/kopano/gateway/cert\&.pem\fR
  311. .RE
  312. .PP
  313. \fBssl_verify_client\fR
  314. .RS 4
  315. Enable client certificate verification with value yes\&. All other values disable the verification\&.
  316. .sp
  317. Default:
  318. \fIno\fR
  319. .RE
  320. .PP
  321. \fBssl_verify_file\fR
  322. .RS 4
  323. The file to verify the clients certificates with\&.
  324. .sp
  325. Default: value not set\&.
  326. .RE
  327. .PP
  328. \fBssl_verify_path\fR
  329. .RS 4
  330. The path with the files to verify the clients certificates with\&.
  331. .sp
  332. Default: value not set\&.
  333. .RE
  334. .PP
  335. \fBssl_protocols\fR
  336. .RS 4
  337. Disabled or enabled protocol names\&. Supported protocol names are
  338. \fISSLv3\fR
  339. and
  340. \fITLSv1\fR\&. If Kopano was linked against OpenSSL 1\&.0\&.1 or later there is additional support for the new protocols
  341. \fITLSv1\&.1\fR
  342. and
  343. \fITLSv1\&.2\fR\&. To exclude both SSLv3 and TLSv1, set
  344. \fBserver_ssl_protocols\fR
  345. to
  346. \fI!SSLv3 !TLSv1\fR\&.
  347. .sp
  348. Default: SSLv2 being disabled
  349. .RE
  350. .PP
  351. \fBssl_ciphers\fR
  352. .RS 4
  353. SSL ciphers to use, set to
  354. \fIALL\fR
  355. for backward compatibility\&.
  356. .sp
  357. Default:
  358. \fIALL:!LOW:!SSLv2:!EXP:!aNULL\fR
  359. .RE
  360. .PP
  361. \fBssl_prefer_server_ciphers\fR
  362. .RS 4
  363. Prefer the server\*(Aqs order of SSL ciphers over client\*(Aqs\&.
  364. .sp
  365. Default:
  366. \fIno\fR
  367. .RE
  368. .PP
  369. \fBlog_method\fR
  370. .RS 4
  371. The method which should be used for logging\&. Valid values are:
  372. .PP
  373. \fIsyslog\fR
  374. .RS 4
  375. Use the Linux system log\&. All messages will be written to the mail facility\&. See also
  376. \fBsyslog.conf\fR(5)\&.
  377. .RE
  378. .PP
  379. \fIfile\fR
  380. .RS 4
  381. Log to a file\&. The filename will be specified in
  382. \fBlog_file\fR\&.
  383. .RE
  384. .sp
  385. Default:
  386. \fIfile\fR
  387. .RE
  388. .PP
  389. \fBlog_file\fR
  390. .RS 4
  391. When logging to a file, specify the filename in this parameter\&. Use
  392. \fI\-\fR
  393. (minus sign) for stderr output\&.
  394. .sp
  395. Default:
  396. \fI/var/log/kopano/gateway\&.log\fR
  397. .RE
  398. .PP
  399. \fBlog_level\fR
  400. .RS 4
  401. The level of output for logging in the range from 0 to 5\&. 0=no logging, 5=full logging\&.
  402. .sp
  403. Default:
  404. \fI2\fR
  405. .RE
  406. .PP
  407. \fBlog_timestamp\fR
  408. .RS 4
  409. Specify whether to prefix each log line with a timestamp in \*(Aqfile\*(Aq logging mode\&.
  410. .sp
  411. Default:
  412. \fI1\fR
  413. .RE
  414. .PP
  415. \fBlog_buffer_size\fR
  416. .RS 4
  417. Buffer logging in what sized blocks\&. The special value 0 selects line buffering\&.
  418. .sp
  419. Default:
  420. \fI0\fR
  421. .RE
  422. .SH "RELOADING"
  423. .PP
  424. The following options are reloadable by sending the kopano\-gateway process a HUP signal:
  425. .PP
  426. log_level
  427. .RS 4
  428. .RE
  429. .SH "FILES"
  430. .PP
  431. /etc/kopano/gateway\&.cfg
  432. .RS 4
  433. The Kopano gateway configuration file\&.
  434. .RE
  435. .SH "AUTHOR"
  436. .PP
  437. Written by Kopano\&.
  438. .SH "SEE ALSO"
  439. .PP
  440. \fBkopano-gateway\fR(8)