説明なし
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

usr_share_z-push_config.php.j2 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. <?php
  2. /***********************************************
  3. * File : config.php
  4. * Project : Z-Push
  5. * Descr : Main configuration file
  6. *
  7. * Created : 01.10.2007
  8. *
  9. * Copyright 2007 - 2016 Zarafa Deutschland GmbH
  10. *
  11. * This program is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License, version 3,
  13. * as published by the Free Software Foundation.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. *
  23. * Consult LICENSE file for details
  24. ************************************************/
  25. /**********************************************************************************
  26. * Default settings
  27. */
  28. // Defines the default time zone, change e.g. to "Europe/London" if necessary
  29. define('TIMEZONE', '{{ zpush_timezone }}');
  30. // Defines the base path on the server
  31. define('BASE_PATH', dirname($_SERVER['SCRIPT_FILENAME']). '/');
  32. // Try to set unlimited timeout
  33. define('SCRIPT_TIMEOUT', 0);
  34. // Use a custom header to determinate the remote IP of a client.
  35. // By default, the server provided REMOTE_ADDR is used. If the header here set
  36. // is available, the provided value will be used, else REMOTE_ADDR is maintained.
  37. // set to false to disable this behaviour.
  38. // common values: 'HTTP_X_FORWARDED_FOR', 'HTTP_X_REAL_IP' (casing is ignored)
  39. define('USE_CUSTOM_REMOTE_IP_HEADER', false);
  40. // When using client certificates, we can check if the login sent matches the owner of the certificate.
  41. // This setting specifies the owner parameter in the certificate to look at.
  42. define("CERTIFICATE_OWNER_PARAMETER", "SSL_CLIENT_S_DN_CN");
  43. /*
  44. * Whether to use the complete email address as a login name
  45. * (e.g. user@company.com) or the username only (user).
  46. * This is required for Z-Push to work properly after autodiscover.
  47. * Possible values:
  48. * false - use the username only.
  49. * true - string the mobile sends as username, e.g. full email address (default).
  50. */
  51. define('USE_FULLEMAIL_FOR_LOGIN', true);
  52. /**********************************************************************************
  53. * StateMachine setting
  54. *
  55. * These StateMachines can be used:
  56. * FILE - FileStateMachine (default). Needs STATE_DIR set as well.
  57. * SQL - SqlStateMachine has own configuration file. STATE_DIR is ignored.
  58. * State migration script is available, more informations: https://wiki.z-hub.io/x/xIAa
  59. */
  60. define('STATE_MACHINE', 'FILE');
  61. define('STATE_DIR', '/data/zpush-state/');
  62. /**********************************************************************************
  63. * IPC - InterProcessCommunication
  64. *
  65. * Is either provided by using shared memory on a single host or
  66. * using the memcache provider for multi-host environments.
  67. * When another implementation should be used, the class can be set here explicitly.
  68. * If empty Z-Push will try to use available providers.
  69. */
  70. define('IPC_PROVIDER', '');
  71. /**********************************************************************************
  72. * Logging settings
  73. *
  74. * The LOGBACKEND specifies where the logs are sent to.
  75. * Either to file ("filelog") or to a "syslog" server or a custom log class in core/log/logclass.
  76. * filelog and syslog have several options that can be set below.
  77. * For more information about the syslog configuration, see https://wiki.z-hub.io/x/HIAT
  78. * Possible LOGLEVEL and LOGUSERLEVEL values are:
  79. * LOGLEVEL_OFF - no logging
  80. * LOGLEVEL_FATAL - log only critical errors
  81. * LOGLEVEL_ERROR - logs events which might require corrective actions
  82. * LOGLEVEL_WARN - might lead to an error or require corrective actions in the future
  83. * LOGLEVEL_INFO - usually completed actions
  84. * LOGLEVEL_DEBUG - debugging information, typically only meaningful to developers
  85. * LOGLEVEL_WBXML - also prints the WBXML sent to/from the device
  86. * LOGLEVEL_DEVICEID - also prints the device id for every log entry
  87. * LOGLEVEL_WBXMLSTACK - also prints the contents of WBXML stack
  88. *
  89. * The verbosity increases from top to bottom. More verbose levels include less verbose
  90. * ones, e.g. setting to LOGLEVEL_DEBUG will also output LOGLEVEL_FATAL, LOGLEVEL_ERROR,
  91. * LOGLEVEL_WARN and LOGLEVEL_INFO level entries.
  92. *
  93. * LOGAUTHFAIL is logged to the LOGBACKEND.
  94. */
  95. define('LOGBACKEND', 'filelog');
  96. define('LOGLEVEL', LOGLEVEL_INFO);
  97. define('LOGAUTHFAIL', false);
  98. // To save e.g. WBXML data only for selected users, add the usernames to the array
  99. // The data will be saved into a dedicated file per user in the LOGFILEDIR
  100. // Users have to be encapusulated in quotes, several users are comma separated, like:
  101. // $specialLogUsers = array('info@domain.com', 'myusername');
  102. define('LOGUSERLEVEL', LOGLEVEL_DEVICEID);
  103. $specialLogUsers = array();
  104. // Filelog settings
  105. define('LOGFILEDIR', '/var/log/z-push/');
  106. define('LOGFILE', LOGFILEDIR . 'z-push.log');
  107. define('LOGERRORFILE', LOGFILEDIR . 'z-push-error.log');
  108. // Syslog settings
  109. // false will log to local syslog, otherwise put the remote syslog IP here
  110. define('LOG_SYSLOG_HOST', false);
  111. // Syslog port
  112. define('LOG_SYSLOG_PORT', 514);
  113. // Program showed in the syslog. Useful if you have more than one instance login to the same syslog
  114. define('LOG_SYSLOG_PROGRAM', 'z-push');
  115. // Syslog facility - use LOG_USER when running on Windows
  116. define('LOG_SYSLOG_FACILITY', LOG_LOCAL0);
  117. // Location of the trusted CA, e.g. '/etc/ssl/certs/EmailCA.pem'
  118. // Uncomment and modify the following line if the validation of the certificates fails.
  119. // define('CAINFO', '/etc/ssl/certs/EmailCA.pem');
  120. /**********************************************************************************
  121. * Mobile settings
  122. */
  123. // Device Provisioning
  124. define('PROVISIONING', true);
  125. // This option allows the 'loose enforcement' of the provisioning policies for older
  126. // devices which don't support provisioning (like WM 5 and HTC Android Mail) - dw2412 contribution
  127. // false (default) - Enforce provisioning for all devices
  128. // true - allow older devices, but enforce policies on devices which support it
  129. define('LOOSE_PROVISIONING', false);
  130. // The file containing the policies' settings.
  131. // Set a full path or relative to the z-push main directory
  132. define('PROVISIONING_POLICYFILE', 'policies.ini');
  133. // Default conflict preference
  134. // Some devices allow to set if the server or PIM (mobile)
  135. // should win in case of a synchronization conflict
  136. // SYNC_CONFLICT_OVERWRITE_SERVER - Server is overwritten, PIM wins
  137. // SYNC_CONFLICT_OVERWRITE_PIM - PIM is overwritten, Server wins (default)
  138. define('SYNC_CONFLICT_DEFAULT', SYNC_CONFLICT_OVERWRITE_PIM);
  139. // Global limitation of items to be synchronized
  140. // The mobile can define a sync back period for calendar and email items
  141. // For large stores with many items the time period could be limited to a max value
  142. // If the mobile transmits a wider time period, the defined max value is used
  143. // Applicable values:
  144. // SYNC_FILTERTYPE_ALL (default, no limitation)
  145. // SYNC_FILTERTYPE_1DAY, SYNC_FILTERTYPE_3DAYS, SYNC_FILTERTYPE_1WEEK, SYNC_FILTERTYPE_2WEEKS,
  146. // SYNC_FILTERTYPE_1MONTH, SYNC_FILTERTYPE_3MONTHS, SYNC_FILTERTYPE_6MONTHS
  147. define('SYNC_FILTERTIME_MAX', SYNC_FILTERTYPE_3MONTHS);
  148. // Interval in seconds before checking if there are changes on the server when in Ping.
  149. // It means the highest time span before a change is pushed to a mobile. Set it to
  150. // a higher value if you have a high load on the server.
  151. define('PING_INTERVAL', 30);
  152. // Set the fileas (save as) order for contacts in the webaccess/webapp/outlook.
  153. // It will only affect new/modified contacts on the mobile which then are synced to the server.
  154. // Possible values are:
  155. // SYNC_FILEAS_FIRSTLAST - fileas will be "Firstname Middlename Lastname"
  156. // SYNC_FILEAS_LASTFIRST - fileas will be "Lastname, Firstname Middlename"
  157. // SYNC_FILEAS_COMPANYONLY - fileas will be "Company"
  158. // SYNC_FILEAS_COMPANYLAST - fileas will be "Company (Lastname, Firstname Middlename)"
  159. // SYNC_FILEAS_COMPANYFIRST - fileas will be "Company (Firstname Middlename Lastname)"
  160. // SYNC_FILEAS_LASTCOMPANY - fileas will be "Lastname, Firstname Middlename (Company)"
  161. // SYNC_FILEAS_FIRSTCOMPANY - fileas will be "Firstname Middlename Lastname (Company)"
  162. // The company-fileas will only be set if a contact has a company set. If one of
  163. // company-fileas is selected and a contact doesn't have a company set, it will default
  164. // to SYNC_FILEAS_FIRSTLAST or SYNC_FILEAS_LASTFIRST (depending on if last or first
  165. // option is selected for company).
  166. // If SYNC_FILEAS_COMPANYONLY is selected and company of the contact is not set
  167. // SYNC_FILEAS_LASTFIRST will be used
  168. define('FILEAS_ORDER', SYNC_FILEAS_LASTFIRST);
  169. // Maximum amount of items to be synchronized per request.
  170. // Normally this value is requested by the mobile. Common values are 5, 25, 50 or 100.
  171. // Exporting too much items can cause mobile timeout on busy systems.
  172. // Z-Push will use the lowest provided value, either set here or by the mobile.
  173. // MS Outlook 2013+ request up to 512 items to accelerate the sync process.
  174. // If you detect high load (also on subsystems) you could try a lower setting.
  175. // max: 512 - value used if mobile does not limit amount of items
  176. define('SYNC_MAX_ITEMS', 512);
  177. // The devices usually send a list of supported properties for calendar and contact
  178. // items. If a device does not includes such a supported property in Sync request,
  179. // it means the property's value will be deleted on the server.
  180. // However some devices do not send a list of supported properties. It is then impossible
  181. // to tell if a property was deleted or it was not set at all if it does not appear in Sync.
  182. // This parameter defines Z-Push behaviour during Sync if a device does not issue a list with
  183. // supported properties.
  184. // See also https://jira.z-hub.io/browse/ZP-302.
  185. // Possible values:
  186. // false - do not unset properties which are not sent during Sync (default)
  187. // true - unset properties which are not sent during Sync
  188. define('UNSET_UNDEFINED_PROPERTIES', false);
  189. // ActiveSync specifies that a contact photo may not exceed 48 KB. This value is checked
  190. // in the semantic sanity checks and contacts with larger photos are not synchronized.
  191. // This limitation is not being followed by the ActiveSync clients which set much bigger
  192. // contact photos. You can override the default value of the max photo size.
  193. // default: 5242880 - 5 MB default max photo size in bytes
  194. define('SYNC_CONTACTS_MAXPICTURESIZE', 5242880);
  195. // Over the WebserviceUsers command it is possible to retrieve a list of all
  196. // known devices and users on this Z-Push system. The authenticated user needs to have
  197. // admin rights and a public folder must exist.
  198. // In multicompany environments this enable an admin user of any company to retrieve
  199. // this full list, so this feature is disabled by default. Enable with care.
  200. define('ALLOW_WEBSERVICE_USERS_ACCESS', false);
  201. // Users with many folders can use the 'partial foldersync' feature, where the server
  202. // actively stops processing the folder list if it takes too long. Other requests are
  203. // then redirected to the FolderSync to synchronize the remaining items.
  204. // Device compatibility for this procedure is not fully understood.
  205. // NOTE: THIS IS AN EXPERIMENTAL FEATURE WHICH COULD PREVENT YOUR MOBILES FROM SYNCHRONIZING.
  206. define('USE_PARTIAL_FOLDERSYNC', false);
  207. // The minimum accepted time in second that a ping command should last.
  208. // It is strongly advised to keep this config to false. Some device
  209. // might not be able to send a higher value than the one specificied here and thus
  210. // unable to start a push connection.
  211. // If set to false, there will be no lower bound to the ping lifetime.
  212. // The minimum accepted value is 1 second. The maximum accepted value is 3540 seconds (59 minutes).
  213. define('PING_LOWER_BOUND_LIFETIME', false);
  214. // The maximum accepted time in second that a ping command should last.
  215. // If set to false, there will be no higher bound to the ping lifetime.
  216. // The minimum accepted value is 1 second. The maximum accepted value is 3540 seconds (59 minutes).
  217. define('PING_HIGHER_BOUND_LIFETIME', false);
  218. // Maximum response time
  219. // Mobiles implement different timeouts to their TCP/IP connections. Android devices for example
  220. // have a hard timeout of 30 seconds. If the server is not able to answer a request within this timeframe,
  221. // the answer will not be recieved and the device will send a new one overloading the server.
  222. // There are three categories
  223. // - Short timeout - server has up within 30 seconds - is automatically applied for not categorized types
  224. // - Medium timeout - server has up to 90 seconds to respond
  225. // - Long timeout - server has up to 4 minutes to respond
  226. // If a timeout is almost reached the server will break and sent the results it has until this
  227. // point. You can add DeviceType strings to the categories.
  228. // In general longer timeouts are better, because more data can be streamed at once.
  229. define('SYNC_TIMEOUT_MEDIUM_DEVICETYPES', "SAMSUNGGTI");
  230. define('SYNC_TIMEOUT_LONG_DEVICETYPES', "iPod, iPad, iPhone, WP, WindowsOutlook, WindowsMail");
  231. // Time in seconds the device should wait whenever the service is unavailable,
  232. // e.g. when a backend service is unavailable.
  233. // Z-Push sends a "Retry-After" header in the response with the here defined value.
  234. // It is up to the device to respect or not this directive so even if this option is set,
  235. // the device might not wait requested time frame.
  236. // Number of seconds before retry, to disable set to: false
  237. define('RETRY_AFTER_DELAY', 300);
  238. /**********************************************************************************
  239. * Backend settings
  240. */
  241. // the backend data provider
  242. define('BACKEND_PROVIDER', 'BackendCombined');
  243. /**********************************************************************************
  244. * Search provider settings
  245. *
  246. * Alternative backend to perform SEARCH requests (GAL search)
  247. * By default the main Backend defines the preferred search functionality.
  248. * If set, the Search Provider will always be preferred.
  249. * Use 'BackendSearchLDAP' to search in a LDAP directory (see backend/searchldap/config.php)
  250. */
  251. define('SEARCH_PROVIDER', '');
  252. // Time in seconds for the server search. Setting it too high might result in timeout.
  253. // Setting it too low might not return all results. Default is 10.
  254. define('SEARCH_WAIT', 10);
  255. // The maximum number of results to send to the client. Setting it too high
  256. // might result in timeout. Default is 10.
  257. define('SEARCH_MAXRESULTS', 10);
  258. /**********************************************************************************
  259. * Kopano Outlook Extension - Settings
  260. *
  261. * The Kopano Outlook Extension (KOE) provides MS Outlook 2013 and newer with
  262. * functionality not provided by ActiveSync or not implemented by Outlook.
  263. * For more information, see: https://wiki.z-hub.io/x/z4Aa
  264. */
  265. // Global Address Book functionality
  266. define('KOE_CAPABILITY_GAB', true);
  267. // Synchronize mail flags from the server to Outlook/KOE
  268. define('KOE_CAPABILITY_RECEIVEFLAGS', true);
  269. // Encode flags when sending from Outlook/KOE
  270. define('KOE_CAPABILITY_SENDFLAGS', true);
  271. // Out-of-office support
  272. define('KOE_CAPABILITY_OOF', true);
  273. // Out-of-office support with start & end times (superseeds KOE_CAPABILITY_OOF)
  274. define('KOE_CAPABILITY_OOFTIMES', true);
  275. // Notes support
  276. define('KOE_CAPABILITY_NOTES', true);
  277. // Shared folder support
  278. define('KOE_CAPABILITY_SHAREDFOLDER', true);
  279. // Send-As support for Outlook/KOE and mobiles
  280. define('KOE_CAPABILITY_SENDAS', true);
  281. // Secondary Contact folders (own and shared)
  282. define('KOE_CAPABILITY_SECONDARYCONTACTS', true);
  283. // Copy WebApp signature into KOE
  284. define('KOE_CAPABILITY_SIGNATURES', true);
  285. // Delivery receipt requests
  286. define('KOE_CAPABILITY_RECEIPTS', true);
  287. // Impersonate other users
  288. define('KOE_CAPABILITY_IMPERSONATE', true);
  289. // To synchronize the GAB KOE, the GAB store and folderid need to be specified.
  290. // Use the gab-sync script to generate this data. The name needs to
  291. // match the config of the gab-sync script.
  292. // More information here: https://wiki.z-hub.io/x/z4Aa (GAB Sync Script)
  293. define('KOE_GAB_STORE', 'SYSTEM');
  294. define('KOE_GAB_FOLDERID', '');
  295. define('KOE_GAB_NAME', 'Z-Push-KOE-GAB');
  296. /**********************************************************************************
  297. * Synchronize additional folders to all mobiles
  298. *
  299. * With this feature, special folders can be synchronized to all mobiles.
  300. * This is useful for e.g. global company contacts.
  301. *
  302. * This feature is supported only by certain devices, like iPhones.
  303. * Check the compatibility list for supported devices:
  304. * http://z-push.org/compatibility
  305. *
  306. * To synchronize a folder, add a section setting all parameters as below:
  307. * store: the ressource where the folder is located.
  308. * Kopano users use 'SYSTEM' for the 'Public Folder'
  309. * folderid: folder id of the folder to be synchronized
  310. * name: name to be displayed on the mobile device
  311. * type: supported types are:
  312. * SYNC_FOLDER_TYPE_USER_CONTACT
  313. * SYNC_FOLDER_TYPE_USER_APPOINTMENT
  314. * SYNC_FOLDER_TYPE_USER_TASK
  315. * SYNC_FOLDER_TYPE_USER_MAIL
  316. * SYNC_FOLDER_TYPE_USER_NOTE
  317. * flags: sets additional options on the shared folder. Supported are:
  318. * DeviceManager::FLD_FLAGS_NONE
  319. * No flags configured, default flag to be set
  320. * DeviceManager::FLD_FLAGS_SENDASOWNER
  321. * When replying in this folder, automatically do Send-As
  322. * DeviceManager::FLD_FLAGS_CALENDARREMINDERS
  323. * If set, Outlook shows reminders for these shares with KOE
  324. *
  325. * Additional notes:
  326. * - on Kopano systems use backend/kopano/listfolders.php script to get a list
  327. * of available folders
  328. *
  329. * - all Z-Push users must have at least reading permissions so the configured
  330. * folders can be synchronized to the mobile. Else they are ignored.
  331. *
  332. * - this feature is only partly suitable for multi-tenancy environments,
  333. * as ALL users from ALL tenents need access to the configured store & folder.
  334. * When configuring a public folder, this will cause problems, as each user has
  335. * a different public folder in his tenant, so the folder are not available.
  336. * - changing this configuration could cause HIGH LOAD on the system, as all
  337. * connected devices will be updated and load the data contained in the
  338. * added/modified folders.
  339. */
  340. $additionalFolders = array(
  341. // demo entry for the synchronization of contacts from the public folder.
  342. // uncomment (remove '/*' '*/') and fill in the folderid
  343. /*
  344. array(
  345. 'store' => "SYSTEM",
  346. 'folderid' => "",
  347. 'name' => "Public Contacts",
  348. 'type' => SYNC_FOLDER_TYPE_USER_CONTACT,
  349. 'flags' => DeviceManager::FLD_FLAGS_NONE,
  350. ),
  351. */
  352. );