[7589] | 1 | <?php |
---|
| 2 | /*********************************************** |
---|
| 3 | * File : backend/combined/config.php |
---|
| 4 | * Project : Z-Push |
---|
| 5 | * Descr : configuration file for the |
---|
| 6 | * combined backend. |
---|
| 7 | * |
---|
| 8 | * Created : 29.11.2010 |
---|
| 9 | * |
---|
| 10 | * Copyright 2007 - 2012 Zarafa Deutschland GmbH |
---|
| 11 | * |
---|
| 12 | * This program is free software: you can redistribute it and/or modify |
---|
| 13 | * it under the terms of the GNU Affero General Public License, version 3, |
---|
| 14 | * as published by the Free Software Foundation with the following additional |
---|
| 15 | * term according to sec. 7: |
---|
| 16 | * |
---|
| 17 | * According to sec. 7 of the GNU Affero General Public License, version 3, |
---|
| 18 | * the terms of the AGPL are supplemented with the following terms: |
---|
| 19 | * |
---|
| 20 | * "Zarafa" is a registered trademark of Zarafa B.V. |
---|
| 21 | * "Z-Push" is a registered trademark of Zarafa Deutschland GmbH |
---|
| 22 | * The licensing of the Program under the AGPL does not imply a trademark license. |
---|
| 23 | * Therefore any rights, title and interest in our trademarks remain entirely with us. |
---|
| 24 | * |
---|
| 25 | * However, if you propagate an unmodified version of the Program you are |
---|
| 26 | * allowed to use the term "Z-Push" to indicate that you distribute the Program. |
---|
| 27 | * Furthermore you may use our trademarks where it is necessary to indicate |
---|
| 28 | * the intended purpose of a product or service provided you use it in accordance |
---|
| 29 | * with honest practices in industrial or commercial matters. |
---|
| 30 | * If you want to propagate modified versions of the Program under the name "Z-Push", |
---|
| 31 | * you may only do so if you have a written permission by Zarafa Deutschland GmbH |
---|
| 32 | * (to acquire a permission please contact Zarafa at trademark@zarafa.com). |
---|
| 33 | * |
---|
| 34 | * This program is distributed in the hope that it will be useful, |
---|
| 35 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 36 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 37 | * GNU Affero General Public License for more details. |
---|
| 38 | * |
---|
| 39 | * You should have received a copy of the GNU Affero General Public License |
---|
| 40 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
| 41 | * |
---|
| 42 | * Consult LICENSE file for details |
---|
| 43 | ************************************************/ |
---|
| 44 | |
---|
| 45 | class BackendCombinedConfig { |
---|
| 46 | |
---|
| 47 | // ************************* |
---|
| 48 | // BackendZarafa settings |
---|
| 49 | // ************************* |
---|
| 50 | public static $BackendZarafa_config = array('MAPI_SERVER' => MAPI_SERVER); |
---|
| 51 | |
---|
| 52 | // ************************* |
---|
| 53 | // BackendIMAP settings |
---|
| 54 | // ************************* |
---|
| 55 | public static $BackendIMAP_config = array( |
---|
| 56 | // Defines the server to which we want to connect |
---|
| 57 | 'IMAP_SERVER' => IMAP_SERVER, |
---|
| 58 | // connecting to default port (143) |
---|
| 59 | 'IMAP_PORT' => IMAP_PORT, |
---|
| 60 | // best cross-platform compatibility (see http://php.net/imap_open for options) |
---|
| 61 | 'IMAP_OPTIONS' => IMAP_OPTIONS, |
---|
| 62 | // overwrite the "from" header if it isn't set when sending emails |
---|
| 63 | // options: 'username' - the username will be set (usefull if your login is equal to your emailaddress) |
---|
| 64 | // 'domain' - the value of the "domain" field is used |
---|
| 65 | // '@mydomain.com' - the username is used and the given string will be appended |
---|
| 66 | 'IMAP_DEFAULTFROM' => IMAP_DEFAULTFROM, |
---|
| 67 | // copy outgoing mail to this folder. If not set z-push will try the default folders |
---|
| 68 | 'IMAP_SENTFOLDER' => IMAP_SENTFOLDER, |
---|
| 69 | // forward messages inline (default false - as attachment) |
---|
| 70 | 'IMAP_INLINE_FORWARD' => IMAP_INLINE_FORWARD, |
---|
| 71 | // use imap_mail() to send emails (default) - if false mail() is used |
---|
| 72 | 'IMAP_USE_IMAPMAIL' => IMAP_USE_IMAPMAIL, |
---|
| 73 | ); |
---|
| 74 | |
---|
| 75 | // ************************* |
---|
| 76 | // BackendMaildir settings |
---|
| 77 | // ************************* |
---|
| 78 | public static $BackendMaildir_config = array( |
---|
| 79 | 'MAILDIR_BASE' => MAILDIR_BASE, |
---|
| 80 | 'MAILDIR_SUBDIR' => MAILDIR_SUBDIR, |
---|
| 81 | ); |
---|
| 82 | |
---|
| 83 | // ************************* |
---|
| 84 | // BackendVCardDir settings |
---|
| 85 | // ************************* |
---|
| 86 | public static $BackendVCardDir_config = array('VCARDDIR_DIR' => VCARDDIR_DIR); |
---|
| 87 | |
---|
| 88 | // ************************* |
---|
| 89 | // BackendCombined settings |
---|
| 90 | // ************************* |
---|
| 91 | /** |
---|
| 92 | * Returns the configuration of the combined backend |
---|
| 93 | * |
---|
| 94 | * @access public |
---|
| 95 | * @return array |
---|
| 96 | * |
---|
| 97 | */ |
---|
| 98 | public static function GetBackendCombinedConfig() { |
---|
| 99 | //use a function for it because php does not allow |
---|
| 100 | //assigning variables to the class members (expecting T_STRING) |
---|
| 101 | return array( |
---|
| 102 | //the order in which the backends are loaded. |
---|
| 103 | //login only succeeds if all backend return true on login |
---|
| 104 | //sending mail: the mail is sent with first backend that is able to send the mail |
---|
| 105 | 'backends' => array( |
---|
| 106 | 'i' => array( |
---|
| 107 | 'name' => 'BackendIMAP', |
---|
| 108 | 'config' => self::$BackendIMAP_config, |
---|
| 109 | ), |
---|
| 110 | 'z' => array( |
---|
| 111 | 'name' => 'BackendZarafa', |
---|
| 112 | 'config' => self::$BackendZarafa_config |
---|
| 113 | ), |
---|
| 114 | 'm' => array( |
---|
| 115 | 'name' => 'BackendMaildir', |
---|
| 116 | 'config' => self::$BackendMaildir_config, |
---|
| 117 | ), |
---|
| 118 | 'v' => array( |
---|
| 119 | 'name' => 'BackendVCardDir', |
---|
| 120 | 'config' => self::$BackendVCardDir_config, |
---|
| 121 | ), |
---|
| 122 | ), |
---|
| 123 | 'delimiter' => '/', |
---|
| 124 | //force one type of folder to one backend |
---|
| 125 | //it must match one of the above defined backends |
---|
| 126 | 'folderbackend' => array( |
---|
| 127 | SYNC_FOLDER_TYPE_INBOX => 'i', |
---|
| 128 | SYNC_FOLDER_TYPE_DRAFTS => 'i', |
---|
| 129 | SYNC_FOLDER_TYPE_WASTEBASKET => 'i', |
---|
| 130 | SYNC_FOLDER_TYPE_SENTMAIL => 'i', |
---|
| 131 | SYNC_FOLDER_TYPE_OUTBOX => 'i', |
---|
| 132 | SYNC_FOLDER_TYPE_TASK => 'z', |
---|
| 133 | SYNC_FOLDER_TYPE_APPOINTMENT => 'z', |
---|
| 134 | SYNC_FOLDER_TYPE_CONTACT => 'z', |
---|
| 135 | SYNC_FOLDER_TYPE_NOTE => 'z', |
---|
| 136 | SYNC_FOLDER_TYPE_JOURNAL => 'z', |
---|
| 137 | SYNC_FOLDER_TYPE_OTHER => 'i', |
---|
| 138 | SYNC_FOLDER_TYPE_USER_MAIL => 'i', |
---|
| 139 | SYNC_FOLDER_TYPE_USER_APPOINTMENT => 'z', |
---|
| 140 | SYNC_FOLDER_TYPE_USER_CONTACT => 'z', |
---|
| 141 | SYNC_FOLDER_TYPE_USER_TASK => 'z', |
---|
| 142 | SYNC_FOLDER_TYPE_USER_JOURNAL => 'z', |
---|
| 143 | SYNC_FOLDER_TYPE_USER_NOTE => 'z', |
---|
| 144 | SYNC_FOLDER_TYPE_UNKNOWN => 'z', |
---|
| 145 | ), |
---|
| 146 | //creating a new folder in the root folder should create a folder in one backend |
---|
| 147 | 'rootcreatefolderbackend' => 'i', |
---|
| 148 | ); |
---|
| 149 | } |
---|
| 150 | } |
---|
| 151 | ?> |
---|