Без опису
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

usr_share_z-push_config.php.j2 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  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 - 2013 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 with the following additional
  14. * term according to sec. 7:
  15. *
  16. * According to sec. 7 of the GNU Affero General Public License, version 3,
  17. * the terms of the AGPL are supplemented with the following terms:
  18. *
  19. * "Zarafa" is a registered trademark of Zarafa B.V.
  20. * "Z-Push" is a registered trademark of Zarafa Deutschland GmbH
  21. * The licensing of the Program under the AGPL does not imply a trademark license.
  22. * Therefore any rights, title and interest in our trademarks remain entirely with us.
  23. *
  24. * However, if you propagate an unmodified version of the Program you are
  25. * allowed to use the term "Z-Push" to indicate that you distribute the Program.
  26. * Furthermore you may use our trademarks where it is necessary to indicate
  27. * the intended purpose of a product or service provided you use it in accordance
  28. * with honest practices in industrial or commercial matters.
  29. * If you want to propagate modified versions of the Program under the name "Z-Push",
  30. * you may only do so if you have a written permission by Zarafa Deutschland GmbH
  31. * (to acquire a permission please contact Zarafa at trademark@zarafa.com).
  32. *
  33. * This program is distributed in the hope that it will be useful,
  34. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  35. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  36. * GNU Affero General Public License for more details.
  37. *
  38. * You should have received a copy of the GNU Affero General Public License
  39. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  40. *
  41. * Consult LICENSE file for details
  42. ************************************************/
  43. /**********************************************************************************
  44. * Default settings
  45. */
  46. // Defines the default time zone, change e.g. to "Europe/London" if necessary
  47. define('TIMEZONE', '{{ zpush_timezone }}');
  48. // Defines the base path on the server
  49. define('BASE_PATH', dirname($_SERVER['SCRIPT_FILENAME']). '/');
  50. // Try to set unlimited timeout
  51. define('SCRIPT_TIMEOUT', 0);
  52. // When accessing through a proxy, the "X-Forwarded-For" header contains the original remote IP
  53. define('USE_X_FORWARDED_FOR_HEADER', false);
  54. // When using client certificates, we can check if the login sent matches the owner of the certificate.
  55. // This setting specifies the owner parameter in the certificate to look at.
  56. define("CERTIFICATE_OWNER_PARAMETER", "SSL_CLIENT_S_DN_CN");
  57. /**********************************************************************************
  58. * Default FileStateMachine settings
  59. */
  60. define('STATE_DIR', '/decrypted/zpush-state/');
  61. /**********************************************************************************
  62. * Logging settings
  63. * Possible LOGLEVEL and LOGUSERLEVEL values are:
  64. * LOGLEVEL_OFF - no logging
  65. * LOGLEVEL_FATAL - log only critical errors
  66. * LOGLEVEL_ERROR - logs events which might require corrective actions
  67. * LOGLEVEL_WARN - might lead to an error or require corrective actions in the future
  68. * LOGLEVEL_INFO - usually completed actions
  69. * LOGLEVEL_DEBUG - debugging information, typically only meaningful to developers
  70. * LOGLEVEL_WBXML - also prints the WBXML sent to/from the device
  71. * LOGLEVEL_DEVICEID - also prints the device id for every log entry
  72. * LOGLEVEL_WBXMLSTACK - also prints the contents of WBXML stack
  73. *
  74. * The verbosity increases from top to bottom. More verbose levels include less verbose
  75. * ones, e.g. setting to LOGLEVEL_DEBUG will also output LOGLEVEL_FATAL, LOGLEVEL_ERROR,
  76. * LOGLEVEL_WARN and LOGLEVEL_INFO level entries.
  77. */
  78. define('LOGFILEDIR', '/var/log/z-push/');
  79. define('LOGFILE', LOGFILEDIR . 'z-push.log');
  80. define('LOGERRORFILE', LOGFILEDIR . 'z-push-error.log');
  81. define('LOGLEVEL', LOGLEVEL_INFO);
  82. define('LOGAUTHFAIL', false);
  83. // To save e.g. WBXML data only for selected users, add the usernames to the array
  84. // The data will be saved into a dedicated file per user in the LOGFILEDIR
  85. // Users have to be encapusulated in quotes, several users are comma separated, like:
  86. // $specialLogUsers = array('info@domain.com', 'myusername');
  87. define('LOGUSERLEVEL', LOGLEVEL_DEVICEID);
  88. $specialLogUsers = array();
  89. // Location of the trusted CA, e.g. '/etc/ssl/certs/EmailCA.pem'
  90. // Uncomment and modify the following line if the validation of the certificates fails.
  91. // define('CAINFO', '/etc/ssl/certs/EmailCA.pem');
  92. /**********************************************************************************
  93. * Mobile settings
  94. */
  95. // Device Provisioning
  96. define('PROVISIONING', true);
  97. // This option allows the 'loose enforcement' of the provisioning policies for older
  98. // devices which don't support provisioning (like WM 5 and HTC Android Mail) - dw2412 contribution
  99. // false (default) - Enforce provisioning for all devices
  100. // true - allow older devices, but enforce policies on devices which support it
  101. define('LOOSE_PROVISIONING', false);
  102. // Default conflict preference
  103. // Some devices allow to set if the server or PIM (mobile)
  104. // should win in case of a synchronization conflict
  105. // SYNC_CONFLICT_OVERWRITE_SERVER - Server is overwritten, PIM wins
  106. // SYNC_CONFLICT_OVERWRITE_PIM - PIM is overwritten, Server wins (default)
  107. define('SYNC_CONFLICT_DEFAULT', SYNC_CONFLICT_OVERWRITE_PIM);
  108. // Global limitation of items to be synchronized
  109. // The mobile can define a sync back period for calendar and email items
  110. // For large stores with many items the time period could be limited to a max value
  111. // If the mobile transmits a wider time period, the defined max value is used
  112. // Applicable values:
  113. // SYNC_FILTERTYPE_ALL (default, no limitation)
  114. // SYNC_FILTERTYPE_1DAY, SYNC_FILTERTYPE_3DAYS, SYNC_FILTERTYPE_1WEEK, SYNC_FILTERTYPE_2WEEKS,
  115. // SYNC_FILTERTYPE_1MONTH, SYNC_FILTERTYPE_3MONTHS, SYNC_FILTERTYPE_6MONTHS
  116. define('SYNC_FILTERTIME_MAX', SYNC_FILTERTYPE_3MONTHS);
  117. // Interval in seconds before checking if there are changes on the server when in Ping.
  118. // It means the highest time span before a change is pushed to a mobile. Set it to
  119. // a higher value if you have a high load on the server.
  120. define('PING_INTERVAL', 30);
  121. // Interval in seconds to force a re-check of potentially missed notifications when
  122. // using a changes sink. Default are 300 seconds (every 5 min).
  123. // This can also be disabled by setting it to false
  124. define('SINK_FORCERECHECK', 300);
  125. // Set the fileas (save as) order for contacts in the webaccess/webapp/outlook.
  126. // It will only affect new/modified contacts on the mobile which then are synced to the server.
  127. // Possible values are:
  128. // SYNC_FILEAS_FIRSTLAST - fileas will be "Firstname Middlename Lastname"
  129. // SYNC_FILEAS_LASTFIRST - fileas will be "Lastname, Firstname Middlename"
  130. // SYNC_FILEAS_COMPANYONLY - fileas will be "Company"
  131. // SYNC_FILEAS_COMPANYLAST - fileas will be "Company (Lastname, Firstname Middlename)"
  132. // SYNC_FILEAS_COMPANYFIRST - fileas will be "Company (Firstname Middlename Lastname)"
  133. // SYNC_FILEAS_LASTCOMPANY - fileas will be "Lastname, Firstname Middlename (Company)"
  134. // SYNC_FILEAS_FIRSTCOMPANY - fileas will be "Firstname Middlename Lastname (Company)"
  135. // The company-fileas will only be set if a contact has a company set. If one of
  136. // company-fileas is selected and a contact doesn't have a company set, it will default
  137. // to SYNC_FILEAS_FIRSTLAST or SYNC_FILEAS_LASTFIRST (depending on if last or first
  138. // option is selected for company).
  139. // If SYNC_FILEAS_COMPANYONLY is selected and company of the contact is not set
  140. // SYNC_FILEAS_LASTFIRST will be used
  141. define('FILEAS_ORDER', SYNC_FILEAS_LASTFIRST);
  142. // Amount of items to be synchronized per request
  143. // Normally this value is requested by the mobile. Common values are 5, 25, 50 or 100.
  144. // Exporting too much items can cause mobile timeout on busy systems.
  145. // Z-Push will use the lowest value, either set here or by the mobile.
  146. // default: 100 - value used if mobile does not limit amount of items
  147. define('SYNC_MAX_ITEMS', 100);
  148. // The devices usually send a list of supported properties for calendar and contact
  149. // items. If a device does not includes such a supported property in Sync request,
  150. // it means the property's value will be deleted on the server.
  151. // However some devices do not send a list of supported properties. It is then impossible
  152. // to tell if a property was deleted or it was not set at all if it does not appear in Sync.
  153. // This parameter defines Z-Push behaviour during Sync if a device does not issue a list with
  154. // supported properties.
  155. // See also https://jira.zarafa.com/browse/ZP-302.
  156. // Possible values:
  157. // false - do not unset properties which are not sent during Sync (default)
  158. // true - unset properties which are not sent during Sync
  159. define('UNSET_UNDEFINED_PROPERTIES', false);
  160. // ActiveSync specifies that a contact photo may not exceed 48 KB. This value is checked
  161. // in the semantic sanity checks and contacts with larger photos are not synchronized.
  162. // This limitation is not being followed by the ActiveSync clients which set much bigger
  163. // contact photos. You can override the default value of the max photo size.
  164. // default: 49152 - 48 KB default max photo size in bytes
  165. define('SYNC_CONTACTS_MAXPICTURESIZE', 49152);
  166. /**********************************************************************************
  167. * Backend settings
  168. */
  169. // the backend data provider
  170. define('BACKEND_PROVIDER', 'BackendIMAP');
  171. // ************************
  172. // BackendZarafa settings
  173. // ************************
  174. // Defines the server to which we want to connect
  175. define('MAPI_SERVER', 'file:///var/run/zarafa');
  176. // ************************
  177. // BackendIMAP settings
  178. // ************************
  179. // Defines the server to which we want to connect
  180. define('IMAP_SERVER', 'localhost');
  181. // connecting to default port (143)
  182. define('IMAP_PORT', 993);
  183. // best cross-platform compatibility (see http://php.net/imap_open for options)
  184. define('IMAP_OPTIONS', '/ssl/novalidate-cert');
  185. // overwrite the "from" header if it isn't set when sending emails
  186. // options: 'username' - the username will be set (usefull if your login is equal to your emailaddress)
  187. // 'domain' - the value of the "domain" field is used
  188. // '@mydomain.com' - the username is used and the given string will be appended
  189. define('IMAP_DEFAULTFROM', '');
  190. // copy outgoing mail to this folder. If not set d-push will try the default folders
  191. define('IMAP_SENTFOLDER', 'Sent');
  192. // forward messages inline (default false - as attachment)
  193. define('IMAP_INLINE_FORWARD', false);
  194. // don't use imap_mail() to send emails.
  195. // true (default, uses imap_mail, which is broken - false uses mail(),
  196. // which handles cc and from in a more sane way)
  197. define('IMAP_USE_IMAPMAIL', false);
  198. // ************************
  199. // BackendMaildir settings
  200. // ************************
  201. define('MAILDIR_BASE', '/tmp');
  202. define('MAILDIR_SUBDIR', 'Maildir');
  203. // **********************
  204. // BackendVCardDir settings
  205. // **********************
  206. define('VCARDDIR_DIR', '/home/%u/.kde/share/apps/kabc/stdvcf');
  207. /**********************************************************************************
  208. * Search provider settings
  209. *
  210. * Alternative backend to perform SEARCH requests (GAL search)
  211. * By default the main Backend defines the preferred search functionality.
  212. * If set, the Search Provider will always be preferred.
  213. * Use 'BackendSearchLDAP' to search in a LDAP directory (see backend/searchldap/config.php)
  214. */
  215. define('SEARCH_PROVIDER', '');
  216. // Time in seconds for the server search. Setting it too high might result in timeout.
  217. // Setting it too low might not return all results. Default is 10.
  218. define('SEARCH_WAIT', 10);
  219. // The maximum number of results to send to the client. Setting it too high
  220. // might result in timeout. Default is 10.
  221. define('SEARCH_MAXRESULTS', 10);
  222. /**********************************************************************************
  223. * Synchronize additional folders to all mobiles
  224. *
  225. * With this feature, special folders can be synchronized to all mobiles.
  226. * This is useful for e.g. global company contacts.
  227. *
  228. * This feature is supported only by certain devices, like iPhones.
  229. * Check the compatibility list for supported devices:
  230. * http://z-push.sf.net/compatibility
  231. *
  232. * To synchronize a folder, add a section setting all parameters as below:
  233. * store: the ressource where the folder is located.
  234. * Zarafa users use 'SYSTEM' for the 'Public Folder'
  235. * folderid: folder id of the folder to be synchronized
  236. * name: name to be displayed on the mobile device
  237. * type: supported types are:
  238. * SYNC_FOLDER_TYPE_USER_CONTACT
  239. * SYNC_FOLDER_TYPE_USER_APPOINTMENT
  240. * SYNC_FOLDER_TYPE_USER_TASK
  241. * SYNC_FOLDER_TYPE_USER_MAIL
  242. *
  243. * Additional notes:
  244. * - on Zarafa systems use backend/zarafa/listfolders.php script to get a list
  245. * of available folders
  246. *
  247. * - all Z-Push users must have full writing permissions (secretary rights) so
  248. * the configured folders can be synchronized to the mobile
  249. *
  250. * - this feature is only partly suitable for multi-tenancy environments,
  251. * as ALL users from ALL tenents need access to the configured store & folder.
  252. * When configuring a public folder, this will cause problems, as each user has
  253. * a different public folder in his tenant, so the folder are not available.
  254. * - changing this configuration could cause HIGH LOAD on the system, as all
  255. * connected devices will be updated and load the data contained in the
  256. * added/modified folders.
  257. */
  258. $additionalFolders = array(
  259. // demo entry for the synchronization of contacts from the public folder.
  260. // uncomment (remove '/*' '*/') and fill in the folderid
  261. /*
  262. array(
  263. 'store' => "SYSTEM",
  264. 'folderid' => "",
  265. 'name' => "Public Contacts",
  266. 'type' => SYNC_FOLDER_TYPE_USER_CONTACT,
  267. ),
  268. */
  269. );
  270. ?>