{"id":13552469,"url":"https://github.com/17Halbe/z-push","last_synced_at":"2025-04-03T03:31:49.947Z","repository":{"id":217309952,"uuid":"127454532","full_name":"17Halbe/z-push","owner":"17Halbe","description":"z-push docker image designed to work with tvial/docker-mailserver ","archived":false,"fork":false,"pushed_at":"2018-04-11T19:50:42.000Z","size":30,"stargazers_count":17,"open_issues_count":1,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-03T23:34:52.484Z","etag":null,"topics":["docker","docker-mailserver","z-push"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/17Halbe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-30T17:23:45.000Z","updated_at":"2023-11-19T01:26:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"e55e9e69-6f64-4def-8864-267d0aee6f57","html_url":"https://github.com/17Halbe/z-push","commit_stats":null,"previous_names":["17halbe/z-push"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/17Halbe%2Fz-push","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/17Halbe%2Fz-push/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/17Halbe%2Fz-push/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/17Halbe%2Fz-push/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/17Halbe","download_url":"https://codeload.github.com/17Halbe/z-push/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246933426,"owners_count":20857049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-mailserver","z-push"],"created_at":"2024-08-01T12:02:04.469Z","updated_at":"2025-04-03T03:31:44.915Z","avatar_url":"https://github.com/17Halbe.png","language":"Shell","readme":"## Z-Push Docker Image for tvial/docker-mailserver\n\nThis [z-push docker image](https://hub.docker.com/r/17halbe/z-push/) is designed to work in lieu with the **tvial/docker-mailserver** (see [tomav/docker-mailserver](https://github.com/tomav/docker-mailserver) for further information.)\n\n#### The following variables are currently used:\n\n- `TIMEZONE`: in the format of `Europe/Zurich`\n- `IMAP_SERVER`: your imap server address/ip\n- `IMAP_PORT`: imap port\n- `SMTP_SERVER`: smtp server address/ip\n- `SMTP_PORT`: smtp port\n- `DEBUG`: [0/1] disables/enables verbose logging.\n\n## Device Setup\n\nFor a quick guide, how to setup up your mobile device, have a look at the [Zarafa-Homepage](https://doc.zarafa.com/7.1/User_Manual/en-US/html/_configure_mobile_platforms.html)\n\n## Configuration\n\nIf you need to change the default configuration, you can do so by placing a `config.php` and/or a `imap.php` into a folder which has to be mounted as a volume to `/config/` inside the container.\n\n**Note:** Those files just get appended to the container configuration files for now.\n\nExample:\n\n```\n  docker run -d -name z-push \\\n  -v ./config:/config/ \\\n  -e TIMEZONE=Europe/Zurich \\\n  -e IMAP_SERVER=imap.yourdomain.tld \\\n  -e IMAP_PORT=143 \\\n  -e SMTP_SERVER=smtp.yourdomain.tld \\\n  -e SMTP_PORT=465 \\\n  -e DEBUG=1 \\\n  17halbe/z-push`\n```\nThe used configuration is being put out to the docker logs upon container start, and can be read by `docker logs \u003cyour_container_name\u003e`\n\nHere are the settings used at the time of writing:\n\n### config.php\n```php\n\u003c?php\n/***********************************************\n* File      :   config.php\n* Project   :   Z-Push\n* Descr     :   Main configuration file\n*\n* Created   :   01.10.2007\n*\n* Copyright 2007 - 2016 Zarafa Deutschland GmbH\n*\n* This program is free software: you can redistribute it and/or modify\n* it under the terms of the GNU Affero General Public License, version 3,\n* as published by the Free Software Foundation.\n*\n* This program is distributed in the hope that it will be useful,\n* but WITHOUT ANY WARRANTY; without even the implied warranty of\n* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n* GNU Affero General Public License for more details.\n*\n* You should have received a copy of the GNU Affero General Public License\n* along with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n*\n* Consult LICENSE file for details\n************************************************/\n\n/**********************************************************************************\n *  Default settings\n */\n    // Defines the default time zone, change e.g. to \"Europe/London\" if necessary\n    define('TIMEZONE', '');\n\n    // Defines the base path on the server\n    define('BASE_PATH', dirname($_SERVER['SCRIPT_FILENAME']). '/');\n\n    // Try to set unlimited timeout\n    define('SCRIPT_TIMEOUT', 0);\n\n    // When accessing through a proxy, the \"X-Forwarded-For\" header contains the original remote IP\n    define('USE_X_FORWARDED_FOR_HEADER', false);\n\n    // When using client certificates, we can check if the login sent matches the owner of the certificate.\n    // This setting specifies the owner parameter in the certificate to look at.\n    define(\"CERTIFICATE_OWNER_PARAMETER\", \"SSL_CLIENT_S_DN_CN\");\n\n    /*\n     * Whether to use the complete email address as a login name\n     * (e.g. user@company.com) or the username only (user).\n     * This is required for Z-Push to work properly after autodiscover.\n     * Possible values:\n     *   false - use the username only.\n     *   true  - string the mobile sends as username, e.g. full email address (default).\n     */\n    define('USE_FULLEMAIL_FOR_LOGIN', true);\n\n/**********************************************************************************\n * StateMachine setting\n *\n * These StateMachines can be used:\n *   FILE  - FileStateMachine (default). Needs STATE_DIR set as well.\n *   SQL   - SqlStateMachine has own configuration file. STATE_DIR is ignored.\n *           State migration script is available, more informations: https://wiki.z-hub.io/x/xIAa\n */\n    define('STATE_MACHINE', 'FILE');\n    define('STATE_DIR', '/state/');\n\n/**********************************************************************************\n *  IPC - InterProcessCommunication\n *\n *  Is either provided by using shared memory on a single host or\n *  using the memcache provider for multi-host environments.\n *  When another implementation should be used, the class can be set here explicitly.\n *  If empty Z-Push will try to use available providers.\n */\n    define('IPC_PROVIDER', '');\n\n/**********************************************************************************\n *  Logging settings\n *\n *  The LOGBACKEND specifies where the logs are sent to.\n *  Either to file (\"filelog\") or to a \"syslog\" server or a custom log class in core/log/logclass.\n *  filelog and syslog have several options that can be set below.\n *  For more information about the syslog configuration, see https://wiki.z-hub.io/x/HIAT\n\n *  Possible LOGLEVEL and LOGUSERLEVEL values are:\n *  LOGLEVEL_OFF            - no logging\n *  LOGLEVEL_FATAL          - log only critical errors\n *  LOGLEVEL_ERROR          - logs events which might require corrective actions\n *  LOGLEVEL_WARN           - might lead to an error or require corrective actions in the future\n *  LOGLEVEL_INFO           - usually completed actions\n *  LOGLEVEL_DEBUG          - debugging information, typically only meaningful to developers\n *  LOGLEVEL_WBXML          - also prints the WBXML sent to/from the device\n *  LOGLEVEL_DEVICEID       - also prints the device id for every log entry\n *  LOGLEVEL_WBXMLSTACK     - also prints the contents of WBXML stack\n *\n *  The verbosity increases from top to bottom. More verbose levels include less verbose\n *  ones, e.g. setting to LOGLEVEL_DEBUG will also output LOGLEVEL_FATAL, LOGLEVEL_ERROR,\n *  LOGLEVEL_WARN and LOGLEVEL_INFO level entries.\n *\n *  LOGAUTHFAIL is logged to the LOGBACKEND.\n */\n    define('LOGBACKEND', 'filelog');\n    define('LOGLEVEL', LOGLEVEL_INFO);\n    define('LOGAUTHFAIL', false);\n\n    // To save e.g. WBXML data only for selected users, add the usernames to the array\n    // The data will be saved into a dedicated file per user in the LOGFILEDIR\n    // Users have to be encapusulated in quotes, several users are comma separated, like:\n    //   $specialLogUsers = array('info@domain.com', 'myusername');\n    define('LOGUSERLEVEL', LOGLEVEL_DEVICEID);\n    $specialLogUsers = array();\n\n    // Filelog settings\n    define('LOGFILEDIR', '/var/log/z-push/');\n    define('LOGFILE', LOGFILEDIR . 'z-push.log');\n    define('LOGERRORFILE', LOGFILEDIR . 'z-push-error.log');\n\n    // Syslog settings\n    // false will log to local syslog, otherwise put the remote syslog IP here\n    define('LOG_SYSLOG_HOST', false);\n    // Syslog port\n    define('LOG_SYSLOG_PORT', 514);\n    // Program showed in the syslog. Useful if you have more than one instance login to the same syslog\n    define('LOG_SYSLOG_PROGRAM', 'z-push');\n    // Syslog facility - use LOG_USER when running on Windows\n    define('LOG_SYSLOG_FACILITY', LOG_LOCAL0);\n\n    // Location of the trusted CA, e.g. '/etc/ssl/certs/EmailCA.pem'\n    // Uncomment and modify the following line if the validation of the certificates fails.\n    // define('CAINFO', '/etc/ssl/certs/EmailCA.pem');\n\n/**********************************************************************************\n *  Mobile settings\n */\n    // Device Provisioning\n    define('PROVISIONING', true);\n\n    // This option allows the 'loose enforcement' of the provisioning policies for older\n    // devices which don't support provisioning (like WM 5 and HTC Android Mail) - dw2412 contribution\n    // false (default) - Enforce provisioning for all devices\n    // true - allow older devices, but enforce policies on devices which support it\n    define('LOOSE_PROVISIONING', false);\n\n    // The file containing the policies' settings.\n    // Set a full path or relative to the z-push main directory\n    define('PROVISIONING_POLICYFILE', 'policies.ini');\n\n    // Default conflict preference\n    // Some devices allow to set if the server or PIM (mobile)\n    // should win in case of a synchronization conflict\n    //   SYNC_CONFLICT_OVERWRITE_SERVER - Server is overwritten, PIM wins\n    //   SYNC_CONFLICT_OVERWRITE_PIM    - PIM is overwritten, Server wins (default)\n    define('SYNC_CONFLICT_DEFAULT', SYNC_CONFLICT_OVERWRITE_PIM);\n\n    // Global limitation of items to be synchronized\n    // The mobile can define a sync back period for calendar and email items\n    // For large stores with many items the time period could be limited to a max value\n    // If the mobile transmits a wider time period, the defined max value is used\n    // Applicable values:\n    //   SYNC_FILTERTYPE_ALL (default, no limitation)\n    //   SYNC_FILTERTYPE_1DAY, SYNC_FILTERTYPE_3DAYS, SYNC_FILTERTYPE_1WEEK, SYNC_FILTERTYPE_2WEEKS,\n    //   SYNC_FILTERTYPE_1MONTH, SYNC_FILTERTYPE_3MONTHS, SYNC_FILTERTYPE_6MONTHS\n    define('SYNC_FILTERTIME_MAX', SYNC_FILTERTYPE_ALL);\n\n    // Interval in seconds before checking if there are changes on the server when in Ping.\n    // It means the highest time span before a change is pushed to a mobile. Set it to\n    // a higher value if you have a high load on the server.\n    define('PING_INTERVAL', 30);\n\n    // Set the fileas (save as) order for contacts in the webaccess/webapp/outlook.\n    // It will only affect new/modified contacts on the mobile which then are synced to the server.\n    // Possible values are:\n    // SYNC_FILEAS_FIRSTLAST    - fileas will be \"Firstname Middlename Lastname\"\n    // SYNC_FILEAS_LASTFIRST    - fileas will be \"Lastname, Firstname Middlename\"\n    // SYNC_FILEAS_COMPANYONLY  - fileas will be \"Company\"\n    // SYNC_FILEAS_COMPANYLAST  - fileas will be \"Company (Lastname, Firstname Middlename)\"\n    // SYNC_FILEAS_COMPANYFIRST - fileas will be \"Company (Firstname Middlename Lastname)\"\n    // SYNC_FILEAS_LASTCOMPANY  - fileas will be \"Lastname, Firstname Middlename (Company)\"\n    // SYNC_FILEAS_FIRSTCOMPANY - fileas will be \"Firstname Middlename Lastname (Company)\"\n    // The company-fileas will only be set if a contact has a company set. If one of\n    // company-fileas is selected and a contact doesn't have a company set, it will default\n    // to SYNC_FILEAS_FIRSTLAST or SYNC_FILEAS_LASTFIRST (depending on if last or first\n    // option is selected for company).\n    // If SYNC_FILEAS_COMPANYONLY is selected and company of the contact is not set\n    // SYNC_FILEAS_LASTFIRST will be used\n    define('FILEAS_ORDER', SYNC_FILEAS_LASTFIRST);\n\n    // Maximum amount of items to be synchronized per request.\n    // Normally this value is requested by the mobile. Common values are 5, 25, 50 or 100.\n    // Exporting too much items can cause mobile timeout on busy systems.\n    // Z-Push will use the lowest provided value, either set here or by the mobile.\n    // MS Outlook 2013+ request up to 512 items to accelerate the sync process.\n    // If you detect high load (also on subsystems) you could try a lower setting.\n    // max: 512 - value used if mobile does not limit amount of items\n    define('SYNC_MAX_ITEMS', 512);\n\n    // The devices usually send a list of supported properties for calendar and contact\n    // items. If a device does not includes such a supported property in Sync request,\n    // it means the property's value will be deleted on the server.\n    // However some devices do not send a list of supported properties. It is then impossible\n    // to tell if a property was deleted or it was not set at all if it does not appear in Sync.\n    // This parameter defines Z-Push behaviour during Sync if a device does not issue a list with\n    // supported properties.\n    // See also https://jira.z-hub.io/browse/ZP-302.\n    // Possible values:\n    // false - do not unset properties which are not sent during Sync (default)\n    // true  - unset properties which are not sent during Sync\n    define('UNSET_UNDEFINED_PROPERTIES', false);\n\n    // ActiveSync specifies that a contact photo may not exceed 48 KB. This value is checked\n    // in the semantic sanity checks and contacts with larger photos are not synchronized.\n    // This limitation is not being followed by the ActiveSync clients which set much bigger\n    // contact photos. You can override the default value of the max photo size.\n    // default: 5242880 - 5 MB default max photo size in bytes\n    define('SYNC_CONTACTS_MAXPICTURESIZE', 5242880);\n\n    // Over the WebserviceUsers command it is possible to retrieve a list of all\n    // known devices and users on this Z-Push system. The authenticated user needs to have\n    // admin rights and a public folder must exist.\n    // In multicompany environments this enable an admin user of any company to retrieve\n    // this full list, so this feature is disabled by default. Enable with care.\n    define('ALLOW_WEBSERVICE_USERS_ACCESS', false);\n\n    // Users with many folders can use the 'partial foldersync' feature, where the server\n    // actively stops processing the folder list if it takes too long. Other requests are\n    // then redirected to the FolderSync to synchronize the remaining items.\n    // Device compatibility for this procedure is not fully understood.\n    // NOTE: THIS IS AN EXPERIMENTAL FEATURE WHICH COULD PREVENT YOUR MOBILES FROM SYNCHRONIZING.\n    define('USE_PARTIAL_FOLDERSYNC', false);\n\n    // The minimum accepted time in second that a ping command should last.\n    // It is strongly advised to keep this config to false. Some device\n    // might not be able to send a higher value than the one specificied here and thus\n    // unable to start a push connection.\n    // If set to false, there will be no lower bound to the ping lifetime.\n    // The minimum accepted value is 1 second. The maximum accepted value is 3540 seconds (59 minutes).\n    define('PING_LOWER_BOUND_LIFETIME', false);\n\n    // The maximum accepted time in second that a ping command should last.\n    // If set to false, there will be no higher bound to the ping lifetime.\n    // The minimum accepted value is 1 second. The maximum accepted value is 3540 seconds (59 minutes).\n    define('PING_HIGHER_BOUND_LIFETIME', false);\n\n    // Maximum response time\n    // Mobiles implement different timeouts to their TCP/IP connections. Android devices for example\n    // have a hard timeout of 30 seconds. If the server is not able to answer a request within this timeframe,\n    // the answer will not be recieved and the device will send a new one overloading the server.\n    // There are three categories\n    //   - Short timeout  - server has up within 30 seconds - is automatically applied for not categorized types\n    //   - Medium timeout - server has up to 90 seconds to respond\n    //   - Long timeout   - server has up to 4 minutes to respond\n    // If a timeout is almost reached the server will break and sent the results it has until this\n    // point. You can add DeviceType strings to the categories.\n    // In general longer timeouts are better, because more data can be streamed at once.\n    define('SYNC_TIMEOUT_MEDIUM_DEVICETYPES', \"SAMSUNGGTI\");\n    define('SYNC_TIMEOUT_LONG_DEVICETYPES',   \"iPod, iPad, iPhone, WP, WindowsOutlook\");\n\n    // Time in seconds the device should wait whenever the service is unavailable,\n    // e.g. when a backend service is unavailable.\n    // Z-Push sends a \"Retry-After\" header in the response with the here defined value.\n    // It is up to the device to respect or not this directive so even if this option is set,\n    // the device might not wait requested time frame.\n    // Number of seconds before retry, to disable set to: false\n    define('RETRY_AFTER_DELAY', 300);\n\n/**********************************************************************************\n *  Backend settings\n */\n    // the backend data provider\n    define('BACKEND_PROVIDER', 'BackendIMAP');\n\n/**********************************************************************************\n *  Search provider settings\n *\n *  Alternative backend to perform SEARCH requests (GAL search)\n *  By default the main Backend defines the preferred search functionality.\n *  If set, the Search Provider will always be preferred.\n *  Use 'BackendSearchLDAP' to search in a LDAP directory (see backend/searchldap/config.php)\n */\n    define('SEARCH_PROVIDER', '');\n    // Time in seconds for the server search. Setting it too high might result in timeout.\n    // Setting it too low might not return all results. Default is 10.\n    define('SEARCH_WAIT', 10);\n    // The maximum number of results to send to the client. Setting it too high\n    // might result in timeout. Default is 10.\n    define('SEARCH_MAXRESULTS', 10);\n\n/**********************************************************************************\n *  Kopano Outlook Extension - Settings\n *\n *  The Kopano Outlook Extension (KOE) provides MS Outlook 2013 and newer with\n *  functionality not provided by ActiveSync or not implemented by Outlook.\n *  For more information, see: https://wiki.z-hub.io/x/z4Aa\n */\n    // Global Address Book functionality\n    define('KOE_CAPABILITY_GAB', true);\n    // Synchronize mail flags from the server to Outlook/KOE\n    define('KOE_CAPABILITY_RECEIVEFLAGS', true);\n    // Encode flags when sending from Outlook/KOE\n    define('KOE_CAPABILITY_SENDFLAGS', true);\n    // Out-of-office support\n    define('KOE_CAPABILITY_OOF', true);\n    // Out-of-office support with start \u0026 end times (superseeds KOE_CAPABILITY_OOF)\n    define('KOE_CAPABILITY_OOFTIMES', true);\n    // Notes support\n    define('KOE_CAPABILITY_NOTES', true);\n    // Shared folder support\n    define('KOE_CAPABILITY_SHAREDFOLDER', true);\n    // Send-As support for Outlook/KOE and mobiles\n    define('KOE_CAPABILITY_SENDAS', true);\n    // Secondary Contact folders (own and shared)\n    define('KOE_CAPABILITY_SECONDARYCONTACTS', true);\n    // Copy WebApp signature into KOE\n    define('KOE_CAPABILITY_SIGNATURES', true);\n    // Delivery receipt requests\n    define('KOE_CAPABILITY_RECEIPTS', true);\n\n    // To synchronize the GAB KOE, the GAB store and folderid need to be specified.\n    // Use the gab-sync script to generate this data. The name needs to\n    // match the config of the gab-sync script.\n    // More information here: https://wiki.z-hub.io/x/z4Aa (GAB Sync Script)\n    define('KOE_GAB_STORE', 'SYSTEM');\n    define('KOE_GAB_FOLDERID', '');\n    define('KOE_GAB_NAME', 'Z-Push-KOE-GAB');\n\n/**********************************************************************************\n *  Synchronize additional folders to all mobiles\n *\n *  With this feature, special folders can be synchronized to all mobiles.\n *  This is useful for e.g. global company contacts.\n *\n *  This feature is supported only by certain devices, like iPhones.\n *  Check the compatibility list for supported devices:\n *      http://z-push.org/compatibility\n *\n *  To synchronize a folder, add a section setting all parameters as below:\n *      store:      the ressource where the folder is located.\n *                  Kopano users use 'SYSTEM' for the 'Public Folder'\n *      folderid:   folder id of the folder to be synchronized\n *      name:       name to be displayed on the mobile device\n *      type:       supported types are:\n *                      SYNC_FOLDER_TYPE_USER_CONTACT\n *                      SYNC_FOLDER_TYPE_USER_APPOINTMENT\n *                      SYNC_FOLDER_TYPE_USER_TASK\n *                      SYNC_FOLDER_TYPE_USER_MAIL\n *                      SYNC_FOLDER_TYPE_USER_NOTE\n *\n *  Additional notes:\n *  - on Kopano systems use backend/kopano/listfolders.php script to get a list\n *    of available folders\n *\n *  - all Z-Push users must have at least reading permissions so the configured\n *    folders can be synchronized to the mobile. Else they are ignored.\n *\n *  - this feature is only partly suitable for multi-tenancy environments,\n *    as ALL users from ALL tenents need access to the configured store \u0026 folder.\n *    When configuring a public folder, this will cause problems, as each user has\n *    a different public folder in his tenant, so the folder are not available.\n\n *  - changing this configuration could cause HIGH LOAD on the system, as all\n *    connected devices will be updated and load the data contained in the\n *    added/modified folders.\n */\n\n    $additionalFolders = array(\n        // demo entry for the synchronization of contacts from the public folder.\n        // uncomment (remove '/*' '*/') and fill in the folderid\n/*\n        array(\n            'store'     =\u003e \"SYSTEM\",\n            'folderid'  =\u003e \"\",\n            'name'      =\u003e \"Public Contacts\",\n            'type'      =\u003e SYNC_FOLDER_TYPE_USER_CONTACT,\n        ),\n*/\n    );\n```\n\n### imap.php\n```php\n\u003c?php\n/***********************************************\n* File      :   config.php\n* Project   :   Z-Push\n* Descr     :   IMAP backend configuration file\n*\n* Created   :   27.11.2012\n*\n* Copyright 2007 - 2016 Zarafa Deutschland GmbH\n*\n* This program is free software: you can redistribute it and/or modify\n* it under the terms of the GNU Affero General Public License, version 3,\n* as published by the Free Software Foundation.\n*\n* This program is distributed in the hope that it will be useful,\n* but WITHOUT ANY WARRANTY; without even the implied warranty of\n* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n* GNU Affero General Public License for more details.\n*\n* You should have received a copy of the GNU Affero General Public License\n* along with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n*\n* Consult LICENSE file for details\n************************************************/\n\n// ************************\n//  BackendIMAP settings\n// ************************\n\n// Defines the server to which we want to connect\ndefine('IMAP_SERVER', 'localhost');\n\n// connecting to default port (143)\ndefine('IMAP_PORT', '143');\n\n// best cross-platform compatibility (see http://php.net/imap_open for options)\ndefine('IMAP_OPTIONS', '/tls/norsh/novalidate-cert');\n\n\n// Mark messages as read when moving to Trash.\n//      BE AWARE that you will lose the unread flag, but some mail clients do this so the Trash folder doesn't get boldened\ndefine('IMAP_AUTOSEEN_ON_DELETE', false);\n\n\n// IMPORTANT: BASIC IMAP FOLDERS [ask your mail admin]\n        // We can have diferent cases (case insensitive):\n        // 1.\n        //      inbox\n        //      sent\n        //      drafts\n        //      trash\n        // 2.\n        //      inbox\n        //      common.sent\n        //      common.drafts\n        //      common.trash\n        // 3.\n        //      common.inbox\n        //      common.sent\n        //      common.drafts\n        //      common.trash\n        // 4.\n        //      common\n        //      common.sent\n        //      common.drafts\n        //      common.trash\n        //\n        // gmail is a special case, where the default folders are under the [gmail] prefix and the folders defined by the user are under INBOX.\n        // This configuration seems to work:\n        //      define('IMAP_FOLDER_PREFIX', '');\n        //      define('IMAP_FOLDER_PREFIX_IN_INBOX', false);\n        //      define('IMAP_FOLDER_INBOX', 'INBOX');\n        //      define('IMAP_FOLDER_SENT', '[Gmail]/Sent');\n        //      define('IMAP_FOLDER_DRAFT', '[Gmail]/Drafts');\n        //      define('IMAP_FOLDER_TRASH', '[Gmail]/Trash');\n        //      define('IMAP_FOLDER_SPAM', '[Gmail]/Spam');\n        //      define('IMAP_FOLDER_ARCHIVE', '[Gmail]/All Mail');\n\n// Since I know you won't configure this, I will raise an error unless you do.\n// When configured set this to true to remove the error\ndefine('IMAP_FOLDER_CONFIGURED', true);\n\n// Folder prefix is the common part in your names (3, 4)\ndefine('IMAP_FOLDER_PREFIX', '');\n\n// Inbox will have the preffix preppend (3 \u0026 4 to true)\ndefine('IMAP_FOLDER_PREFIX_IN_INBOX', false);\n\n// Inbox folder name (case doesn't matter) - (empty in 4)\ndefine('IMAP_FOLDER_INBOX', 'INBOX');\n\n// Sent folder name (case doesn't matter)\ndefine('IMAP_FOLDER_SENT', 'SENT');\n\n// Draft folder name (case doesn't matter)\ndefine('IMAP_FOLDER_DRAFT', 'DRAFTS');\n\n// Trash folder name (case doesn't matter)\ndefine('IMAP_FOLDER_TRASH', 'TRASH');\n\n// Spam folder name (case doesn't matter). Only showed as special by iOS devices\ndefine('IMAP_FOLDER_SPAM', 'SPAM');\n\n// Archive folder name (case doesn't matter). Only showed as special by iOS devices\ndefine('IMAP_FOLDER_ARCHIVE', 'ARCHIVE');\n\n\n\n// forward messages inline (default true - inlined)\ndefine('IMAP_INLINE_FORWARD', true);\n\n// list of folders we want to exclude from sync. Names, or part of it, separated by |\n// example: dovecot.sieve|archive|spam\ndefine('IMAP_EXCLUDED_FOLDERS', '');\n\n\n\n// overwrite the \"from\" header with some value\n// options:\n//        ''              - do nothing, use the From header\n//        'username'      - the username will be set (usefull if your login is equal to your emailaddress)\n//        'domain'        - the value of the \"domain\" field is used\n//        'sql'           - the username will be the result of a sql query. REMEMBER TO INSTALL PHP-PDO AND PHP-DATABASE\n//        'ldap'          - the username will be the result of a ldap query. REMEMBER TO INSTALL PHP-LDAP!!\n//        '@mydomain.com' - the username is used and the given string will be appended\ndefine('IMAP_DEFAULTFROM', '');\n\n// DSN: formatted PDO connection string\n//    mysql:host=xxx;port=xxx;dbname=xxx\n// USER: username to DB\n// PASSWORD: password to DB\n// OPTIONS: array with options needed\n// QUERY: query to execute\n// FIELDS: columns in the query\n// FROM: string that will be the from, replacing the column names with the values\ndefine('IMAP_FROM_SQL_DSN', '');\ndefine('IMAP_FROM_SQL_USER', '');\ndefine('IMAP_FROM_SQL_PASSWORD', '');\ndefine('IMAP_FROM_SQL_OPTIONS', serialize(array(PDO::ATTR_PERSISTENT =\u003e true)));\ndefine('IMAP_FROM_SQL_QUERY', \"select first_name, last_name, mail_address from users where mail_address = '#username@#domain'\");\ndefine('IMAP_FROM_SQL_FIELDS', serialize(array('first_name', 'last_name', 'mail_address')));\ndefine('IMAP_FROM_SQL_FROM', '#first_name #last_name \u003c#mail_address\u003e');\ndefine('IMAP_FROM_SQL_FULLNAME', '#first_name #last_name');\n\n// SERVER: ldap server\n// SERVER_PORT: ldap port\n// USER: dn to use for connecting\n// PASSWORD: password\n// QUERY: query to execute\n// FIELDS: columns in the query\n// FROM: string that will be the from, replacing the field names with the values\ndefine('IMAP_FROM_LDAP_SERVER', 'localhost');\ndefine('IMAP_FROM_LDAP_SERVER_PORT', '389');\ndefine('IMAP_FROM_LDAP_USER', 'cn=zpush,ou=servers,dc=zpush,dc=org');\ndefine('IMAP_FROM_LDAP_PASSWORD', 'password');\ndefine('IMAP_FROM_LDAP_BASE', 'dc=zpush,dc=org');\ndefine('IMAP_FROM_LDAP_QUERY', '(mail=#username@#domain)');\ndefine('IMAP_FROM_LDAP_FIELDS', serialize(array('givenname', 'sn', 'mail')));\ndefine('IMAP_FROM_LDAP_FROM', '#givenname #sn \u003c#mail\u003e');\ndefine('IMAP_FROM_LDAP_FULLNAME', '#givenname #sn');\n\n\n\n// Method used for sending mail\n// mail =\u003e mail() php function\n// sendmail =\u003e sendmail executable\n// smtp =\u003e direct connection against SMTP\ndefine('IMAP_SMTP_METHOD', 'smtp');\n\nglobal $imap_smtp_params;\n// SMTP Parameters\n//      mail : no params\n$imap_smtp_params = array('host' =\u003e 'tls://localhost', 'port' =\u003e '465', 'auth' =\u003e true, 'username' =\u003e 'imap_username', 'password' =\u003e 'imap_password', 'verify_peer_name' =\u003e false, 'verify_peer' =\u003e false, 'allow_self_signed' =\u003e true);\n//      sendmail\n//$imap_smtp_params = array('sendmail_path' =\u003e '/usr/bin/sendmail', 'sendmail_args' =\u003e '-i');\n//      smtp\n//          \"host\"              - The server to connect. Default is localhost.\n//          \"port\"              - The port to connect. Default is 25.\n//          \"auth\"              - Whether or not to use SMTP authentication. Default is FALSE.\n//          \"username\"          - The username to use for SMTP authentication. \"imap_username\" for using the same username as the imap server\n//          \"password\"          - The password to use for SMTP authentication. \"imap_password\" for using the same password as the imap server\n//          \"localhost\"         - The value to give when sending EHLO or HELO. Default is localhost\n//          \"timeout\"           - The SMTP connection timeout. Default is NULL (no timeout).\n//          \"verp\"              - Whether to use VERP or not. Default is FALSE.\n//          \"debug\"             - Whether to enable SMTP debug mode or not. Default is FALSE.\n//          \"persist\"           - Indicates whether or not the SMTP connection should persist over multiple calls to the send() method.\n//          \"pipelining\"        - Indicates whether or not the SMTP commands pipelining should be used.\n//          \"verify_peer\"       - Require verification of SSL certificate used. Default is TRUE.\n//          \"verify_peer_name\"  - Require verification of peer name. Default is TRUE.\n//          \"allow_self_signed\" - Allow self-signed certificates. Requires verify_peer. Default is FALSE.\n//$imap_smtp_params = array('host' =\u003e 'localhost', 'port' =\u003e 25, 'auth' =\u003e false);\n// If you want to use SSL with port 25 or port 465 you must preppend \"ssl://\" before the hostname or IP of your SMTP server\n// IMPORTANT: To use SSL you must use PHP 5.1 or later, install openssl libs and use ssl:// within the host variable\n// IMPORTANT: To use SSL with PHP 5.6 you should set verify_peer, verify_peer_name and allow_self_signed\n//$imap_smtp_params = array('host' =\u003e 'ssl://localhost', 'port' =\u003e 465, 'auth' =\u003e true, 'username' =\u003e 'imap_username', 'password' =\u003e 'imap_password');\n\n\n\n// If you are using IMAP_SMTP_METHOD = mail or sendmail and your sent messages are not correctly displayed you can change this to \"\\n\".\n//   BUT, it doesn't comply with RFC 2822 and will break if using smtp method\ndefine('MAIL_MIMEPART_CRLF', \"\\r\\n\");\n\n\n// A file containing file mime types-\u003eextension mappings.\n//  SELINUX users: make sure the file has a security context accesible by your apache/php-fpm process\ndefine('SYSTEM_MIME_TYPES_MAPPING', '/etc/mime.types');\n\n\n// Use BackendCalDAV for Meetings. You cannot hope to get that functionality working without a caldav backend.\ndefine('IMAP_MEETING_USE_CALDAV', false);\n```\n\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F17Halbe%2Fz-push","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F17Halbe%2Fz-push","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F17Halbe%2Fz-push/lists"}