Back to index

d-push  2.0
config.php
Go to the documentation of this file.
00001 <?php
00002 /***********************************************
00003 * File      :   config.php
00004 * Project   :   Z-Push
00005 * Descr     :   Main configuration file
00006 *
00007 * Created   :   01.10.2007
00008 *
00009 * Copyright 2007 - 2010 Zarafa Deutschland GmbH
00010 *
00011 * This program is free software: you can redistribute it and/or modify
00012 * it under the terms of the GNU Affero General Public License, version 3,
00013 * as published by the Free Software Foundation with the following additional
00014 * term according to sec. 7:
00015 *
00016 * According to sec. 7 of the GNU Affero General Public License, version 3,
00017 * the terms of the AGPL are supplemented with the following terms:
00018 *
00019 * "Zarafa" is a registered trademark of Zarafa B.V.
00020 * "Z-Push" is a registered trademark of Zarafa Deutschland GmbH
00021 * The licensing of the Program under the AGPL does not imply a trademark license.
00022 * Therefore any rights, title and interest in our trademarks remain entirely with us.
00023 *
00024 * However, if you propagate an unmodified version of the Program you are
00025 * allowed to use the term "Z-Push" to indicate that you distribute the Program.
00026 * Furthermore you may use our trademarks where it is necessary to indicate
00027 * the intended purpose of a product or service provided you use it in accordance
00028 * with honest practices in industrial or commercial matters.
00029 * If you want to propagate modified versions of the Program under the name "Z-Push",
00030 * you may only do so if you have a written permission by Zarafa Deutschland GmbH
00031 * (to acquire a permission please contact Zarafa at trademark@zarafa.com).
00032 *
00033 * This program is distributed in the hope that it will be useful,
00034 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00035 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00036 * GNU Affero General Public License for more details.
00037 *
00038 * You should have received a copy of the GNU Affero General Public License
00039 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00040 *
00041 * Consult LICENSE file for details
00042 ************************************************/
00043 
00044 /**********************************************************************************
00045  *  Default settings
00046  */
00047     // Defines the default time zone, change e.g. to "Europe/London" if necessary
00048     define('TIMEZONE', '');
00049 
00050     // Defines the base path on the server
00051     define('BASE_PATH', dirname($_SERVER['SCRIPT_FILENAME']). '/');
00052 
00053     // Try to set unlimited timeout
00054     define('SCRIPT_TIMEOUT', 0);
00055 
00056     //Max size of attachments to display inline. Default is 1MB
00057     define('MAX_EMBEDDED_SIZE', 1048576);
00058 
00059 
00060 /**********************************************************************************
00061  *  Default FileStateMachine settings
00062  */
00063     define('STATE_DIR', '/var/lib/z-push/');
00064 
00065 
00066 /**********************************************************************************
00067  *  Logging settings
00068  */
00069     define('LOGFILEDIR', '/var/log/z-push/');
00070     define('LOGFILE', LOGFILEDIR . 'z-push.log');
00071     define('LOGERRORFILE', LOGFILEDIR . 'z-push-error.log');
00072     define('LOGLEVEL', LOGLEVEL_INFO);
00073     define('LOGAUTHFAIL', false);
00074 
00075 
00076     // To save e.g. WBXML data only for selected users, add the usernames to the array
00077     // The data will be saved into a dedicated file per user in the LOGFILEDIR
00078     define('LOGUSERLEVEL', LOGLEVEL_DEVICEID);
00079     $specialLogUsers = array();
00080 
00081 
00082 /**********************************************************************************
00083  *  Mobile settings
00084  */
00085     // Device Provisioning
00086     define('PROVISIONING', true);
00087 
00088     // This option allows the 'loose enforcement' of the provisioning policies for older
00089     // devices which don't support provisioning (like WM 5 and HTC Android Mail) - dw2412 contribution
00090     // false (default) - Enforce provisioning for all devices
00091     // true - allow older devices, but enforce policies on devices which support it
00092     define('LOOSE_PROVISIONING', false);
00093 
00094     // Default conflict preference
00095     // Some devices allow to set if the server or PIM (mobile)
00096     // should win in case of a synchronization conflict
00097     //   SYNC_CONFLICT_OVERWRITE_SERVER - Server is overwritten, PIM wins
00098     //   SYNC_CONFLICT_OVERWRITE_PIM    - PIM is overwritten, Server wins (default)
00099     define('SYNC_CONFLICT_DEFAULT', SYNC_CONFLICT_OVERWRITE_PIM);
00100 
00101     // Global limitation of items to be synchronized
00102     // The mobile can define a sync back period for calendar and email items
00103     // For large stores with many items the time period could be limited to a max value
00104     // If the mobile transmits a wider time period, the defined max value is used
00105     // Applicable values:
00106     //   SYNC_FILTERTYPE_ALL (default, no limitation)
00107     //   SYNC_FILTERTYPE_1DAY, SYNC_FILTERTYPE_3DAYS, SYNC_FILTERTYPE_1WEEK, SYNC_FILTERTYPE_2WEEKS,
00108     //   SYNC_FILTERTYPE_1MONTH, SYNC_FILTERTYPE_3MONTHS, SYNC_FILTERTYPE_6MONTHS
00109     define('SYNC_FILTERTIME_MAX', SYNC_FILTERTYPE_ALL);
00110 
00111     // Interval in seconds before checking if there are changes on the server when in Ping.
00112     // It means the highest time span before a change is pushed to a mobile. Set it to
00113     // a higher value if you have a high load on the server.
00114     define('PING_INTERVAL', 30);
00115 
00116     // Interval in seconds to force a re-check of potentially missed notifications when
00117     // using a changes sink. Default are 300 seconds (every 5 min).
00118     // This can also be disabled by setting it to false
00119     define('SINK_FORCERECHECK', 300);
00120 
00121 /**********************************************************************************
00122  *  Backend settings
00123  */
00124     // The data providers that we are using (see configuration below)
00125     define('BACKEND_PROVIDER', "BackendZarafa");
00126 
00127 
00128     // ************************
00129     //  BackendZarafa settings
00130     // ************************
00131     // Defines the server to which we want to connect
00132     define('MAPI_SERVER', 'file:///var/run/zarafa');
00133 
00134 
00135     // ************************
00136     //  BackendIMAP settings
00137     // ************************
00138     // Defines the server to which we want to connect
00139     define('IMAP_SERVER', 'localhost');
00140     // connecting to default port (143)
00141     define('IMAP_PORT', 143);
00142     // best cross-platform compatibility (see http://php.net/imap_open for options)
00143     define('IMAP_OPTIONS', '/notls/norsh');
00144     // overwrite the "from" header if it isn't set when sending emails
00145     // options: 'username'    - the username will be set (usefull if your login is equal to your emailaddress)
00146     //        'domain'    - the value of the "domain" field is used
00147     //        '@mydomain.com' - the username is used and the given string will be appended
00148     define('IMAP_DEFAULTFROM', '');
00149     // copy outgoing mail to this folder. If not set z-push will try the default folders
00150     define('IMAP_SENTFOLDER', '');
00151     // forward messages inline (default false - as attachment)
00152     define('IMAP_INLINE_FORWARD', false);
00153     // use imap_mail() to send emails (default) - if false mail() is used
00154     define('IMAP_USE_IMAPMAIL', true);
00155 
00156 
00157     // ************************
00158     //  BackendMaildir settings
00159     // ************************
00160     define('MAILDIR_BASE', '/tmp');
00161     define('MAILDIR_SUBDIR', 'Maildir');
00162 
00163     // **********************
00164     //  BackendVCardDir settings
00165     // **********************
00166     define('VCARDDIR_DIR', '/home/%u/.kde/share/apps/kabc/stdvcf');
00167 
00168 
00169 /**********************************************************************************
00170  *  Search provider settings
00171  *
00172  *  Alternative backend to perform SEARCH requests (GAL search)
00173  *  By default the main Backend defines the preferred search functionality.
00174  *  If set, the Search Provider will always be preferred.
00175  *  Use 'BackendSearchLDAP' to search in a LDAP directory (see backend/searchldap/config.php)
00176  */
00177     define('SEARCH_PROVIDER', '');
00178     // Time in seconds for the server search. Setting it too high might result in timeout.
00179     // Setting it too low might not return all results. Default is 10.
00180     define('SEARCH_WAIT', 10);
00181     // The maximum number of results to send to the client. Setting it too high
00182     // might result in timeout. Default is 10.
00183     define('SEARCH_MAXRESULTS', 10);
00184 
00185 
00186 /**********************************************************************************
00187  *  Synchronize additional folders to all mobiles
00188  *
00189  *  With this feature, special folders can be synchronized to all mobiles.
00190  *  This is useful for e.g. global company contacts.
00191  *
00192  *  This feature is supported only by certain devices, like iPhones.
00193  *  Check the compatibility list for supported devices:
00194  *      http://z-push.sf.net/compatibility
00195  *
00196  *  To synchronize a folder, add a section setting all parameters as below:
00197  *      store:      the ressource where the folder is located.
00198  *                  Zarafa users use 'SYSTEM' for the 'Public Folder'
00199  *      folderid:   folder id of the folder to be synchronized
00200  *      name:       name to be displayed on the mobile device
00201  *      type:       supported types are:
00202  *                      SYNC_FOLDER_TYPE_USER_CONTACT
00203  *                      SYNC_FOLDER_TYPE_USER_APPOINTMENT
00204  *                      SYNC_FOLDER_TYPE_USER_TASK
00205  *                      SYNC_FOLDER_TYPE_USER_MAIL
00206  *
00207  *  Additional notes:
00208  *  - on Zarafa systems use backend/zarafa/listfolders.php script to get a list
00209  *    of available folders
00210  *
00211  *  - all Z-Push users must have full writing permissions (secretary rights) so
00212  *    the configured folders can be synchronized to the mobile
00213  *
00214  *  - this feature is only partly suitable for multi-tenancy environments,
00215  *    as ALL users from ALL tenents need access to the configured store & folder.
00216  *    When configuring a public folder, this will cause problems, as each user has
00217  *    a different public folder in his tenant, so the folder are not available.
00218 
00219  *  - changing this configuration could cause HIGH LOAD on the system, as all
00220  *    connected devices will be updated and load the data contained in the
00221  *    added/modified folders.
00222  */
00223 
00224     $additionalFolders = array(
00225         // demo entry for the synchronization of contacts from the public folder.
00226         // uncomment (remove '/*' '*/') and fill in the folderid
00227 /*
00228         array(
00229             'store'     => "SYSTEM",
00230             'folderid'  => "",
00231             'name'      => "Public Contacts",
00232             'type'      => SYNC_FOLDER_TYPE_USER_CONTACT,
00233         ),
00234 */
00235     );
00236 
00237 ?>