Sfoglia il codice sorgente

Use Z-Push from official upstream repos. Configure imap, caldav, carddav backends properly for nextcloud. Using Z-Push Autodiscover.

Thomas Buck 5 anni fa
parent
commit
5a900bb33a

+ 1
- 4
roles/mailserver/defaults/main.yml Vedi File

@@ -21,7 +21,4 @@ virtual_domains: []
21 21
 mail_virtual_users: []
22 22
 mail_virtual_aliases: []
23 23
 
24
-# zpush
25
-zpush_version: 2.1.1-1788
26
-# common_timezone is a sovereign variable
27
-zpush_timezone: "{{ common_timezone|default('Etc/UTC') }}"
24
+zpush_timezone: "{{ common_timezone | default('Etc/UTC') }}"

+ 0
- 7
roles/mailserver/files/etc_apache2_conf.d_z-push.conf Vedi File

@@ -1,7 +0,0 @@
1
-Alias /Microsoft-Server-ActiveSync /usr/share/z-push/index.php
2
-<Directory /usr/share/z-push>
3
-    php_flag magic_quotes_gpc off        
4
-    php_flag register_globals off        
5
-    php_flag magic_quotes_runtime off        
6
-    php_flag short_open_tag on    
7
-</Directory>

+ 73
- 44
roles/mailserver/tasks/z-push.yml Vedi File

@@ -1,64 +1,93 @@
1
-- name: Install required packages for z-push (PHP5 variant)
2
-  apt: pkg={{ item }} state=present
3
-  with_items:
4
-    - php-soap
5
-    - php5
6
-    - php5-cli
7
-    - php5-imap
8
-  when: (ansible_distribution_release != "xenial" and ansible_distribution_release != "bionic" and ansible_distribution_release != "stretch")
9
-  tags:
10
-    - dependencies
1
+---
2
+# Installs and configures the Z-Push "ActiveSync" push notifications.
11 3
 
12
-- name: Install required packages for z-push
13
-  apt: pkg={{ item }} state=present
14
-  with_items:
15
-    - php-soap
16
-    - php
17
-    - php-cli
18
-    - php-imap
19
-  when: (ansible_distribution_release == "xenial" or ansible_distribution_release == "bionic" or ansible_distribution_release == "stretch")
4
+- name: Ensure repository key for Z-Push is in place
5
+  apt_key:
6
+    url=http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key
7
+    state=present
20 8
   tags:
21 9
     - dependencies
22 10
 
23
-- name: Download z-push release
24
-  get_url:
25
-    url=http://download.z-push.org/final/2.1/z-push-{{ zpush_version }}.tar.gz
26
-    dest=/root/z-push-{{ zpush_version }}.tar.gz
27
-
28
-- name: Decompress z-push source
29
-  unarchive: src=/root/z-push-{{ zpush_version }}.tar.gz
30
-             dest=/root copy=no
31
-             creates=/root/z-push-{{ zpush_version }}
32
-
33
-- name: Create /usr/share/z-push
34
-  file: state=directory path=/usr/share/z-push
35
-
36
-- name: Copy z-push source files to /usr/share/z-push
37
-  shell: cp -R z-push-{{ zpush_version }}/* /usr/share/z-push/ chdir=/root
11
+- name: Add Z-Push repository
12
+  apt_repository:
13
+    repo="deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /"
38 14
   tags:
39
-    - skip_ansible_lint
15
+    - dependencies
40 16
 
41
-- name: Remove downloaded, temporary z-push source files
42
-  shell: rm -rf z-push* chdir=/root
17
+- name: Install Z-Push
18
+  apt:
19
+    name: "{{ packages }}"
20
+    state: present
21
+  vars:
22
+    packages:
23
+    - z-push-common
24
+    - z-push-backend-combined
25
+    - z-push-backend-imap
26
+    - z-push-backend-carddav
27
+    - z-push-backend-caldav
28
+    - z-push-ipc-sharedmemory
29
+    - z-push-config-apache
30
+    - z-push-autodiscover
43 31
   tags:
44
-    - skip_ansible_lint
32
+    - dependencies
45 33
 
46
-- name: Ensure z-push state and log directories are in place
47
-  file: state=directory path={{ item }} owner=www-data group=www-data mode=0755
34
+- name: Ensure Z-Push state and log directories are in place
35
+  file:
36
+    state=directory
37
+    path={{ item }}
38
+    owner=www-data
39
+    group=www-data
40
+    mode=0755
48 41
   with_items:
49 42
     - /data/zpush-state
50 43
     - /var/log/z-push
51 44
   notify: restart apache
52 45
 
53
-- name: Copy z-push's config.php into place
54
-  template: src=usr_share_z-push_config.php.j2 dest=/usr/share/z-push/config.php
46
+- name: Copy Z-Push common config.php into place
47
+  template:
48
+    src=usr_share_z-push_config.php.j2
49
+    dest=/usr/share/z-push/config.php
50
+
51
+- name: Copy Z-Push combined backend config.php into place
52
+  template:
53
+    src=usr_share_z-push_backend_combined_config.php.j2
54
+    dest=/usr/share/z-push/backend/combined/config.php
55
+
56
+- name: Copy Z-Push IMAP backend config.php into place
57
+  template:
58
+    src=usr_share_z-push_backend_imap_config.php.j2
59
+    dest=/usr/share/z-push/backend/imap/config.php
60
+
61
+- name: Copy Z-Push CardDAV backend config.php into place
62
+  template:
63
+    src=usr_share_z-push_backend_carddav_config.php.j2
64
+    dest=/usr/share/z-push/backend/carddav/config.php
55 65
 
56
-- name: Create z-push apache alias and php configuration file
57
-  copy: src=etc_apache2_conf.d_z-push.conf dest=/etc/apache2/conf-available/z-push.conf
66
+- name: Copy Z-Push CalDAV backend config.php into place
67
+  template:
68
+    src=usr_share_z-push_backend_caldav_config.php.j2
69
+    dest=/usr/share/z-push/backend/caldav/config.php
70
+
71
+- name: Copy Z-Push autodiscover config.php into place
72
+  template:
73
+    src=usr_share_z-push_autodiscover_config.php.j2
74
+    dest=/usr/share/z-push/autodiscover/config.php
75
+
76
+- name: Add Z-Push autodiscover to Apache config
77
+  lineinfile:
78
+    path: /etc/apache2/conf-available/z-push.conf
79
+    line: '    AliasMatch (?i)/Autodiscover/Autodiscover.xml$ "/usr/share/z-push/autodiscover/autodiscover.php"'
80
+    insertafter: 'Microsoft-Server-ActiveSync'
81
+  notify: restart apache
58 82
 
59 83
 - name: Enable z-push Apache alias and PHP configuration file
60 84
   command: a2enconf z-push creates=/etc/apache2/conf-enabled/z-push.conf
61 85
   notify: restart apache
62 86
 
63 87
 - name: Configure z-push logrotate
64
-  copy: src=etc_logrotate_z-push dest=/etc/logrotate.d/z-push owner=root group=root mode=0644
88
+  copy:
89
+    src=etc_logrotate_z-push
90
+    dest=/etc/logrotate.d/z-push
91
+    owner=root
92
+    group=root
93
+    mode=0644

+ 110
- 0
roles/mailserver/templates/usr_share_z-push_autodiscover_config.php.j2 Vedi File

@@ -0,0 +1,110 @@
1
+<?php
2
+/***********************************************
3
+* File      :   config.php
4
+* Project   :   Z-Push
5
+* Descr     :   Autodiscover configuration file
6
+*
7
+* Created   :   30.07.2014
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
+/**********************************************************************************
27
+ *  Default settings
28
+ */
29
+
30
+    // Replace zpush.example.com with your z-push's host name and uncomment the line below.
31
+    define('ZPUSH_HOST', '{{ domain }}');
32
+
33
+    // Defines the default time zone, change e.g. to "Europe/London" if necessary
34
+    define('TIMEZONE', '{{ zpush_timezone }}');
35
+
36
+    // Defines the base path on the server
37
+    define('BASE_PATH', dirname($_SERVER['SCRIPT_FILENAME']). '/');
38
+
39
+    /*
40
+     * Whether to use the complete email address as a login name
41
+     * (e.g. user@company.com) or the username only (user).
42
+     * Possible values:
43
+     * false - use the username only (default).
44
+     * true - use the complete email address.
45
+     */
46
+    define('USE_FULLEMAIL_FOR_LOGIN', true);
47
+
48
+    /*
49
+     * AutoDiscover requires the username to match either the email address
50
+     * or the local part of the email address.
51
+     * This is not always possible as the username might have a different
52
+     * schema than email address. Configure this parameter to match your
53
+     * username settings.
54
+     * @see https://wiki.z-hub.io/display/ZP/Configuring+Z-Push+Autodiscover#ConfiguringZ-PushAutodiscover-Configuration
55
+     * @see https://jira.z-hub.io/browse/ZP-1209
56
+     *
57
+     * Possible values:
58
+     * AUTODISCOVER_LOGIN_EMAIL             - uses the email address as provided when setting up the account
59
+     * AUTODISCOVER_LOGIN_NO_DOT            - removes the '.' from email address:
60
+     *                                          email: first.last@domain.com -> resulting username: firstlast
61
+     * AUTODISCOVER_LOGIN_F_NO_DOT_LAST     - cuts the first part before '.' after the first letter and
62
+     *                                          removes the '.' from email address:
63
+     *                                          email: first.last@domain.com -> resulting username: flast
64
+     * AUTODISCOVER_LOGIN_F_DOT_LAST        - cuts the part before '.' after the first letter and
65
+     *                                          leaves the part after '.' as is:
66
+     *                                          email: first.last@domain.com -> resulting username: f.last
67
+     */
68
+    define('AUTODISCOVER_LOGIN_TYPE', AUTODISCOVER_LOGIN_EMAIL);
69
+
70
+/**********************************************************************************
71
+ *  Logging settings
72
+ *  Possible LOGLEVEL and LOGUSERLEVEL values are:
73
+ *  LOGLEVEL_OFF            - no logging
74
+ *  LOGLEVEL_FATAL          - log only critical errors
75
+ *  LOGLEVEL_ERROR          - logs events which might require corrective actions
76
+ *  LOGLEVEL_WARN           - might lead to an error or require corrective actions in the future
77
+ *  LOGLEVEL_INFO           - usually completed actions
78
+ *  LOGLEVEL_DEBUG          - debugging information, typically only meaningful to developers
79
+ *  LOGLEVEL_WBXML          - also prints the WBXML sent to/from the device
80
+ *  LOGLEVEL_DEVICEID       - also prints the device id for every log entry
81
+ *  LOGLEVEL_WBXMLSTACK     - also prints the contents of WBXML stack
82
+ *
83
+ *  The verbosity increases from top to bottom. More verbose levels include less verbose
84
+ *  ones, e.g. setting to LOGLEVEL_DEBUG will also output LOGLEVEL_FATAL, LOGLEVEL_ERROR,
85
+ *  LOGLEVEL_WARN and LOGLEVEL_INFO level entries.
86
+ */
87
+
88
+    define('LOGBACKEND', 'filelog');
89
+
90
+    define('LOGFILEDIR', '/var/log/z-push/');
91
+    define('LOGFILE', LOGFILEDIR . 'autodiscover.log');
92
+    define('LOGERRORFILE', LOGFILEDIR . 'autodiscover-error.log');
93
+    define('LOGLEVEL', LOGLEVEL_INFO);
94
+    define('LOGUSERLEVEL', LOGLEVEL);
95
+    $specialLogUsers = array();
96
+
97
+    // Syslog settings
98
+    // false will log to local syslog, otherwise put the remote syslog IP here
99
+    define('LOG_SYSLOG_HOST', false);
100
+    // Syslog port
101
+    define('LOG_SYSLOG_PORT', 514);
102
+    // Program showed in the syslog. Useful if you have more than one instance login to the same syslog
103
+    define('LOG_SYSLOG_PROGRAM', 'z-push-autodiscover');
104
+    // Syslog facility - use LOG_USER when running on Windows
105
+    define('LOG_SYSLOG_FACILITY', LOG_LOCAL0);
106
+/**********************************************************************************
107
+ *  Backend settings
108
+ */
109
+    // the backend data provider
110
+    define('BACKEND_PROVIDER', 'BackendCombined');

+ 56
- 0
roles/mailserver/templates/usr_share_z-push_backend_caldav_config.php.j2 Vedi File

@@ -0,0 +1,56 @@
1
+<?php
2
+/***********************************************
3
+* File      :   config.php
4
+* Project   :   Z-Push
5
+* Descr     :   CalDAV backend configuration file
6
+*
7
+* Created   :   27.11.2012
8
+*
9
+* Copyright 2012 - 2014 Jean-Louis Dupond
10
+*
11
+* Jean-Louis Dupond released this code as AGPLv3 here: https://github.com/dupondje/PHP-Push-2/issues/93
12
+*
13
+* This program is free software: you can redistribute it and/or modify
14
+* it under the terms of the GNU Affero General Public License, version 3,
15
+* as published by the Free Software Foundation.
16
+*
17
+* This program is distributed in the hope that it will be useful,
18
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+* GNU Affero General Public License for more details.
21
+*
22
+* You should have received a copy of the GNU Affero General Public License
23
+* along with this program.  If not, see <http://www.gnu.org/licenses/>.
24
+*
25
+* Consult LICENSE file for details
26
+************************************************/
27
+
28
+// ************************
29
+//  BackendCalDAV settings
30
+// ************************
31
+
32
+// Server protocol: http or https
33
+define('CALDAV_PROTOCOL', 'https');
34
+
35
+// Server name
36
+define('CALDAV_SERVER', 'cloud.{{ domain }}');
37
+
38
+// Server port
39
+define('CALDAV_PORT', '443');
40
+
41
+// Path
42
+define('CALDAV_PATH', '/remote.php/dav/calendars/%u/');
43
+
44
+// Default CalDAV folder (calendar folder/principal). This will be marked as the default calendar in the mobile
45
+define('CALDAV_PERSONAL', 'personal');
46
+
47
+// If the CalDAV server supports the sync-collection operation
48
+// DAViCal, SOGo and SabreDav support it
49
+// SabreDav version must be at least 1.9.0, otherwise set this to false
50
+// Setting this to false will work with most servers, but it will be slower
51
+define('CALDAV_SUPPORTS_SYNC', true);
52
+
53
+
54
+// Maximum period to sync.
55
+// Some servers don't support more than 10 years so you will need to change this
56
+define('CALDAV_MAX_SYNC_PERIOD', 2147483647);

+ 91
- 0
roles/mailserver/templates/usr_share_z-push_backend_carddav_config.php.j2 Vedi File

@@ -0,0 +1,91 @@
1
+<?php
2
+/***********************************************
3
+* File      :   config.php
4
+* Project   :   Z-Push
5
+* Descr     :   CardDAV backend configuration file
6
+*
7
+* Created   :   16.03.2013
8
+*
9
+* Copyright 2013 - 2016 Francisco Miguel Biete
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
+// ************************
27
+//  BackendCardDAV settings
28
+// ************************
29
+
30
+// Server protocol: http or https
31
+define('CARDDAV_PROTOCOL', 'https');
32
+
33
+// Server name
34
+define('CARDDAV_SERVER', 'cloud.{{ domain }}');
35
+
36
+// Server port
37
+define('CARDDAV_PORT', '443');
38
+
39
+// Server path to the addressbook, or the principal with the addressbooks
40
+//  If your user has more than 1 addressbook point it to the principal.
41
+//  Example: user test@domain.com will have 2 addressbooks
42
+//      http://localhost/caldav.php/test@domain.com/addresses/personal
43
+//      http://localhost/caldav.php/test@domain.com/addresses/work
44
+//      You set the CARDDAV_PATH to '/caldav.php/%u/addresses/' and personal and work will be autodiscovered
45
+// %u: replaced with the username
46
+// %d: replaced with the domain
47
+//   Add the trailing /
48
+define('CARDDAV_PATH', '/remote.php/dav/addressbooks/users/%u/contacts/');
49
+
50
+
51
+// Server path to the default addressbook
52
+//  Mobile device will create new contacts here. It must be under CARDDAV_PATH
53
+// %u: replaced with the username
54
+// %d: replaced with the domain
55
+//   Add the trailing /
56
+define('CARDDAV_DEFAULT_PATH', '/remote.php/dav/addressbooks/users/%u/contacts/');
57
+
58
+// Server path to the GAL addressbook. This addressbook is readonly and searchable by the user, but it will NOT be synced.
59
+// If you don't want GAL, comment it
60
+// %u: replaced with the username
61
+// %d: replaced with the domain
62
+//  Add the trailing /
63
+//define('CARDDAV_GAL_PATH', '/caldav.php/%d/GAL/');
64
+
65
+// Minimal length for the search pattern to do the real search.
66
+define('CARDDAV_GAL_MIN_LENGTH', 5);
67
+
68
+// Addressbook display name, the name showed in the mobile device
69
+// %u: replaced with the username
70
+// %d: replaced with the domain
71
+define('CARDDAV_CONTACTS_FOLDER_NAME', '%u Addressbook');
72
+
73
+
74
+// If the CardDAV server supports the sync-collection operation
75
+// DAViCal and SabreDav support it, but Owncloud, SOGo don't
76
+// SabreDav version must be at least 1.9.0, otherwise set this to false
77
+// Setting this to false will work with most servers, but it will be slower: 1 petition for the href of vcards, and 1 petition for each vcard
78
+define('CARDDAV_SUPPORTS_SYNC', true);
79
+
80
+
81
+// If the CardDAV server supports the FN attribute for searches
82
+// DAViCal supports it, but SabreDav, Owncloud and SOGo don't
83
+// Setting this to true will search by FN. If false will search by sn, givenName and email
84
+// It's safe to leave it as false
85
+define('CARDDAV_SUPPORTS_FN_SEARCH', false);
86
+
87
+
88
+// If your carddav server needs to use file extension to recover a vcard.
89
+//    Davical needs it
90
+//    SOGo official demo online needs it, but some SOGo installation don't need it, so test it
91
+define('CARDDAV_URL_VCARD_EXTENSION', '.vcf');

+ 84
- 0
roles/mailserver/templates/usr_share_z-push_backend_combined_config.php.j2 Vedi File

@@ -0,0 +1,84 @@
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 - 2016 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.
15
+*
16
+* This program is distributed in the hope that it will be useful,
17
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+* GNU Affero General Public License for more details.
20
+*
21
+* You should have received a copy of the GNU Affero General Public License
22
+* along with this program.  If not, see <http://www.gnu.org/licenses/>.
23
+*
24
+* Consult LICENSE file for details
25
+************************************************/
26
+
27
+class BackendCombinedConfig {
28
+
29
+    // *************************
30
+    //  BackendCombined settings
31
+    // *************************
32
+    /**
33
+     * Returns the configuration of the combined backend
34
+     *
35
+     * @access public
36
+     * @return array
37
+     *
38
+     */
39
+    public static function GetBackendCombinedConfig() {
40
+        //use a function for it because php does not allow
41
+        //assigning variables to the class members (expecting T_STRING)
42
+        return array(
43
+            //the order in which the backends are loaded.
44
+            //login only succeeds if all backend return true on login
45
+            //sending mail: the mail is sent with first backend that is able to send the mail
46
+            'backends' => array(
47
+                'i' => array(
48
+                    'name' => 'BackendIMAP',
49
+                ),
50
+                'd' => array(
51
+                    'name' => 'BackendCardDAV',
52
+                ),
53
+                'c' => array(
54
+                    'name' => 'BackendCalDAV',
55
+                ),
56
+            ),
57
+            'delimiter' => '/',
58
+            //force one type of folder to one backend
59
+            //it must match one of the above defined backends
60
+            'folderbackend' => array(
61
+                SYNC_FOLDER_TYPE_INBOX => 'i',
62
+                SYNC_FOLDER_TYPE_DRAFTS => 'i',
63
+                SYNC_FOLDER_TYPE_WASTEBASKET => 'i',
64
+                SYNC_FOLDER_TYPE_SENTMAIL => 'i',
65
+                SYNC_FOLDER_TYPE_OUTBOX => 'i',
66
+                SYNC_FOLDER_TYPE_TASK => 'c',
67
+                SYNC_FOLDER_TYPE_APPOINTMENT => 'c',
68
+                SYNC_FOLDER_TYPE_CONTACT => 'd',
69
+                SYNC_FOLDER_TYPE_NOTE => 'c',
70
+                SYNC_FOLDER_TYPE_JOURNAL => 'c',
71
+                SYNC_FOLDER_TYPE_OTHER => 'i',
72
+                SYNC_FOLDER_TYPE_USER_MAIL => 'i',
73
+                SYNC_FOLDER_TYPE_USER_APPOINTMENT => 'c',
74
+                SYNC_FOLDER_TYPE_USER_CONTACT => 'd',
75
+                SYNC_FOLDER_TYPE_USER_TASK => 'c',
76
+                SYNC_FOLDER_TYPE_USER_JOURNAL => 'c',
77
+                SYNC_FOLDER_TYPE_USER_NOTE => 'c',
78
+                SYNC_FOLDER_TYPE_UNKNOWN => 'i',
79
+            ),
80
+            //creating a new folder in the root folder should create a folder in one backend
81
+            'rootcreatefolderbackend' => 'i',
82
+        );
83
+    }
84
+}

+ 217
- 0
roles/mailserver/templates/usr_share_z-push_backend_imap_config.php.j2 Vedi File

@@ -0,0 +1,217 @@
1
+<?php
2
+/***********************************************
3
+* File      :   config.php
4
+* Project   :   Z-Push
5
+* Descr     :   IMAP backend configuration file
6
+*
7
+* Created   :   27.11.2012
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
+// ************************
27
+//  BackendIMAP settings
28
+// ************************
29
+
30
+// Defines the server to which we want to connect
31
+define('IMAP_SERVER', 'localhost');
32
+
33
+// connecting to custom port (993)
34
+define('IMAP_PORT', 993);
35
+
36
+// best cross-platform compatibility (see http://php.net/imap_open for options)
37
+define('IMAP_OPTIONS', '/ssl/novalidate-cert');
38
+
39
+
40
+// Mark messages as read when moving to Trash.
41
+//      BE AWARE that you will lose the unread flag, but some mail clients do this so the Trash folder doesn't get boldened
42
+define('IMAP_AUTOSEEN_ON_DELETE', false);
43
+
44
+
45
+// IMPORTANT: BASIC IMAP FOLDERS [ask your mail admin]
46
+        // We can have diferent cases (case insensitive):
47
+        // 1.
48
+        //      inbox
49
+        //      sent
50
+        //      drafts
51
+        //      trash
52
+        // 2.
53
+        //      inbox
54
+        //      common.sent
55
+        //      common.drafts
56
+        //      common.trash
57
+        // 3.
58
+        //      common.inbox
59
+        //      common.sent
60
+        //      common.drafts
61
+        //      common.trash
62
+        // 4.
63
+        //      common
64
+        //      common.sent
65
+        //      common.drafts
66
+        //      common.trash
67
+        //
68
+        // gmail is a special case, where the default folders are under the [gmail] prefix and the folders defined by the user are under INBOX.
69
+        // This configuration seems to work:
70
+        //      define('IMAP_FOLDER_PREFIX', '');
71
+        //      define('IMAP_FOLDER_PREFIX_IN_INBOX', false);
72
+        //      define('IMAP_FOLDER_INBOX', 'INBOX');
73
+        //      define('IMAP_FOLDER_SENT', '[Gmail]/Sent');
74
+        //      define('IMAP_FOLDER_DRAFT', '[Gmail]/Drafts');
75
+        //      define('IMAP_FOLDER_TRASH', '[Gmail]/Trash');
76
+        //      define('IMAP_FOLDER_SPAM', '[Gmail]/Spam');
77
+        //      define('IMAP_FOLDER_ARCHIVE', '[Gmail]/All Mail');
78
+
79
+// Since I know you won't configure this, I will raise an error unless you do.
80
+// When configured set this to true to remove the error
81
+define('IMAP_FOLDER_CONFIGURED', true);
82
+
83
+// Folder prefix is the common part in your names (3, 4)
84
+define('IMAP_FOLDER_PREFIX', 'inbox');
85
+
86
+// Inbox will have the preffix preppend (3 & 4 to true)
87
+define('IMAP_FOLDER_PREFIX_IN_INBOX', true);
88
+
89
+// Inbox folder name (case doesn't matter) - (empty in 4)
90
+define('IMAP_FOLDER_INBOX', 'INBOX');
91
+
92
+// Sent folder name (case doesn't matter)
93
+define('IMAP_FOLDER_SENT', 'Sent');
94
+
95
+// Draft folder name (case doesn't matter)
96
+define('IMAP_FOLDER_DRAFT', 'Drafts');
97
+
98
+// Trash folder name (case doesn't matter)
99
+define('IMAP_FOLDER_TRASH', 'Trash');
100
+
101
+// Spam folder name (case doesn't matter). Only showed as special by iOS devices
102
+define('IMAP_FOLDER_SPAM', 'Junk');
103
+
104
+// Archive folder name (case doesn't matter). Only showed as special by iOS devices
105
+define('IMAP_FOLDER_ARCHIVE', 'Archive');
106
+
107
+
108
+
109
+// forward messages inline (default true - inlined)
110
+define('IMAP_INLINE_FORWARD', true);
111
+
112
+// list of folders we want to exclude from sync. Names, or part of it, separated by |
113
+// example: dovecot.sieve|archive|spam
114
+define('IMAP_EXCLUDED_FOLDERS', '');
115
+
116
+
117
+
118
+// overwrite the "from" header with some value
119
+// options:
120
+//        ''              - do nothing, use the From header
121
+//        'username'      - the username will be set (usefull if your login is equal to your emailaddress)
122
+//        'domain'        - the value of the "domain" field is used
123
+//        'sql'           - the username will be the result of a sql query. REMEMBER TO INSTALL PHP-PDO AND PHP-DATABASE
124
+//        'ldap'          - the username will be the result of a ldap query. REMEMBER TO INSTALL PHP-LDAP!!
125
+//        '@mydomain.com' - the username is used and the given string will be appended
126
+define('IMAP_DEFAULTFROM', '');
127
+
128
+// DSN: formatted PDO connection string
129
+//    mysql:host=xxx;port=xxx;dbname=xxx
130
+// USER: username to DB
131
+// PASSWORD: password to DB
132
+// OPTIONS: array with options needed
133
+// QUERY: query to execute
134
+// FIELDS: columns in the query
135
+// FROM: string that will be the from, replacing the column names with the values
136
+define('IMAP_FROM_SQL_DSN', '');
137
+define('IMAP_FROM_SQL_USER', '');
138
+define('IMAP_FROM_SQL_PASSWORD', '');
139
+define('IMAP_FROM_SQL_OPTIONS', serialize(array(PDO::ATTR_PERSISTENT => true)));
140
+define('IMAP_FROM_SQL_QUERY', "select first_name, last_name, mail_address from users where mail_address = '#username@#domain'");
141
+define('IMAP_FROM_SQL_FIELDS', serialize(array('first_name', 'last_name', 'mail_address')));
142
+define('IMAP_FROM_SQL_EMAIL', '#mail_address');
143
+define('IMAP_FROM_SQL_FROM', '#first_name #last_name <#mail_address>');
144
+define('IMAP_FROM_SQL_FULLNAME', '#first_name #last_name');
145
+
146
+// SERVER: ldap server
147
+// SERVER_PORT: ldap port
148
+// USER: dn to use for connecting
149
+// PASSWORD: password
150
+// QUERY: query to execute
151
+// FIELDS: columns in the query
152
+// FROM: string that will be the from, replacing the field names with the values
153
+define('IMAP_FROM_LDAP_SERVER', 'localhost');
154
+define('IMAP_FROM_LDAP_SERVER_PORT', '389');
155
+define('IMAP_FROM_LDAP_USER', 'cn=zpush,ou=servers,dc=zpush,dc=org');
156
+define('IMAP_FROM_LDAP_PASSWORD', 'password');
157
+define('IMAP_FROM_LDAP_BASE', 'dc=zpush,dc=org');
158
+define('IMAP_FROM_LDAP_QUERY', '(mail=#username@#domain)');
159
+define('IMAP_FROM_LDAP_FIELDS', serialize(array('givenname', 'sn', 'mail')));
160
+define('IMAP_FROM_LDAP_EMAIL', '#mail');
161
+define('IMAP_FROM_LDAP_FROM', '#givenname #sn <#mail>');
162
+define('IMAP_FROM_LDAP_FULLNAME', '#givenname #sn');
163
+
164
+
165
+
166
+// Method used for sending mail
167
+// mail => mail() php function
168
+// sendmail => sendmail executable
169
+// smtp => direct connection against SMTP
170
+define('IMAP_SMTP_METHOD', 'mail');
171
+
172
+global $imap_smtp_params;
173
+// SMTP Parameters
174
+//      mail : no params
175
+$imap_smtp_params = array();
176
+//      sendmail
177
+//$imap_smtp_params = array('sendmail_path' => '/usr/bin/sendmail', 'sendmail_args' => '-i');
178
+//      smtp
179
+//          "host"              - The server to connect. Default is localhost.
180
+//          "port"              - The port to connect. Default is 25.
181
+//          "auth"              - Whether or not to use SMTP authentication. Default is FALSE.
182
+//          "username"          - The username to use for SMTP authentication. "imap_username" for using the same username as the imap server
183
+//          "password"          - The password to use for SMTP authentication. "imap_password" for using the same password as the imap server
184
+//          "localhost"         - The value to give when sending EHLO or HELO. Default is localhost
185
+//          "timeout"           - The SMTP connection timeout. Default is NULL (no timeout).
186
+//          "verp"              - Whether to use VERP or not. Default is FALSE.
187
+//          "debug"             - Whether to enable SMTP debug mode or not. Default is FALSE.
188
+//          "persist"           - Indicates whether or not the SMTP connection should persist over multiple calls to the send() method.
189
+//          "pipelining"        - Indicates whether or not the SMTP commands pipelining should be used.
190
+//          "verify_peer"       - Require verification of SSL certificate used. Default is TRUE.
191
+//          "verify_peer_name"  - Require verification of peer name. Default is TRUE.
192
+//          "allow_self_signed" - Allow self-signed certificates. Requires verify_peer. Default is FALSE.
193
+//$imap_smtp_params = array('host' => 'localhost', 'port' => 25, 'auth' => false);
194
+// 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
195
+// IMPORTANT: To use SSL you must use PHP 5.1 or later, install openssl libs and use ssl:// within the host variable
196
+// IMPORTANT: To use SSL with PHP 5.6 you should set verify_peer, verify_peer_name and allow_self_signed
197
+//$imap_smtp_params = array('host' => 'ssl://localhost', 'port' => 465, 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password');
198
+
199
+
200
+
201
+// If you are using IMAP_SMTP_METHOD = mail or sendmail and your sent messages are not correctly displayed you can change this to "\n".
202
+//   BUT, it doesn't comply with RFC 2822 and will break if using smtp method
203
+define('MAIL_MIMEPART_CRLF', "\r\n");
204
+
205
+
206
+// A file containing file mime types->extension mappings.
207
+//  SELINUX users: make sure the file has a security context accesible by your apache/php-fpm process
208
+define('SYSTEM_MIME_TYPES_MAPPING', '/etc/mime.types');
209
+
210
+
211
+// Use BackendCalDAV for Meetings. You cannot hope to get that functionality working without a caldav backend.
212
+define('IMAP_MEETING_USE_CALDAV', false);
213
+
214
+// If your IMAP server allows authenticating via GSSAPI, php-imap will not fall back properly to other authentication
215
+// methods and you will be unable to log in. Uncomment the following line to disable that authentication method.
216
+// Multiple methods can be specified as a comma-separated string.
217
+// define('IMAP_DISABLE_AUTHENTICATOR', 'GSSAPI');

+ 174
- 91
roles/mailserver/templates/usr_share_z-push_config.php.j2 Vedi File

@@ -6,29 +6,11 @@
6 6
 *
7 7
 * Created   :   01.10.2007
8 8
 *
9
-* Copyright 2007 - 2013 Zarafa Deutschland GmbH
9
+* Copyright 2007 - 2016 Zarafa Deutschland GmbH
10 10
 *
11 11
 * This program is free software: you can redistribute it and/or modify
12 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).
13
+* as published by the Free Software Foundation.
32 14
 *
33 15
 * This program is distributed in the hope that it will be useful,
34 16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -53,21 +35,56 @@
53 35
     // Try to set unlimited timeout
54 36
     define('SCRIPT_TIMEOUT', 0);
55 37
 
56
-    // When accessing through a proxy, the "X-Forwarded-For" header contains the original remote IP
57
-    define('USE_X_FORWARDED_FOR_HEADER', false);
38
+    // Use a custom header to determinate the remote IP of a client.
39
+    // By default, the server provided REMOTE_ADDR is used. If the header here set
40
+    // is available, the provided value will be used, else REMOTE_ADDR is maintained.
41
+    // set to false to disable this behaviour.
42
+    // common values: 'HTTP_X_FORWARDED_FOR', 'HTTP_X_REAL_IP' (casing is ignored)
43
+    define('USE_CUSTOM_REMOTE_IP_HEADER', false);
58 44
 
59 45
     // When using client certificates, we can check if the login sent matches the owner of the certificate.
60 46
     // This setting specifies the owner parameter in the certificate to look at.
61 47
     define("CERTIFICATE_OWNER_PARAMETER", "SSL_CLIENT_S_DN_CN");
62 48
 
49
+    /*
50
+     * Whether to use the complete email address as a login name
51
+     * (e.g. user@company.com) or the username only (user).
52
+     * This is required for Z-Push to work properly after autodiscover.
53
+     * Possible values:
54
+     *   false - use the username only.
55
+     *   true  - string the mobile sends as username, e.g. full email address (default).
56
+     */
57
+    define('USE_FULLEMAIL_FOR_LOGIN', true);
58
+
63 59
 /**********************************************************************************
64
- *  Default FileStateMachine settings
60
+ * StateMachine setting
61
+ *
62
+ * These StateMachines can be used:
63
+ *   FILE  - FileStateMachine (default). Needs STATE_DIR set as well.
64
+ *   SQL   - SqlStateMachine has own configuration file. STATE_DIR is ignored.
65
+ *           State migration script is available, more informations: https://wiki.z-hub.io/x/xIAa
65 66
  */
67
+    define('STATE_MACHINE', 'FILE');
66 68
     define('STATE_DIR', '/data/zpush-state/');
67 69
 
70
+/**********************************************************************************
71
+ *  IPC - InterProcessCommunication
72
+ *
73
+ *  Is either provided by using shared memory on a single host or
74
+ *  using the memcache provider for multi-host environments.
75
+ *  When another implementation should be used, the class can be set here explicitly.
76
+ *  If empty Z-Push will try to use available providers.
77
+ */
78
+    define('IPC_PROVIDER', '');
68 79
 
69 80
 /**********************************************************************************
70 81
  *  Logging settings
82
+ *
83
+ *  The LOGBACKEND specifies where the logs are sent to.
84
+ *  Either to file ("filelog") or to a "syslog" server or a custom log class in core/log/logclass.
85
+ *  filelog and syslog have several options that can be set below.
86
+ *  For more information about the syslog configuration, see https://wiki.z-hub.io/x/HIAT
87
+
71 88
  *  Possible LOGLEVEL and LOGUSERLEVEL values are:
72 89
  *  LOGLEVEL_OFF            - no logging
73 90
  *  LOGLEVEL_FATAL          - log only critical errors
@@ -82,14 +99,13 @@
82 99
  *  The verbosity increases from top to bottom. More verbose levels include less verbose
83 100
  *  ones, e.g. setting to LOGLEVEL_DEBUG will also output LOGLEVEL_FATAL, LOGLEVEL_ERROR,
84 101
  *  LOGLEVEL_WARN and LOGLEVEL_INFO level entries.
102
+ *
103
+ *  LOGAUTHFAIL is logged to the LOGBACKEND.
85 104
  */
86
-    define('LOGFILEDIR', '/var/log/z-push/');
87
-    define('LOGFILE', LOGFILEDIR . 'z-push.log');
88
-    define('LOGERRORFILE', LOGFILEDIR . 'z-push-error.log');
105
+    define('LOGBACKEND', 'filelog');
89 106
     define('LOGLEVEL', LOGLEVEL_INFO);
90 107
     define('LOGAUTHFAIL', false);
91 108
 
92
-
93 109
     // To save e.g. WBXML data only for selected users, add the usernames to the array
94 110
     // The data will be saved into a dedicated file per user in the LOGFILEDIR
95 111
     // Users have to be encapusulated in quotes, several users are comma separated, like:
@@ -97,6 +113,21 @@
97 113
     define('LOGUSERLEVEL', LOGLEVEL_DEVICEID);
98 114
     $specialLogUsers = array();
99 115
 
116
+    // Filelog settings
117
+    define('LOGFILEDIR', '/var/log/z-push/');
118
+    define('LOGFILE', LOGFILEDIR . 'z-push.log');
119
+    define('LOGERRORFILE', LOGFILEDIR . 'z-push-error.log');
120
+
121
+    // Syslog settings
122
+    // false will log to local syslog, otherwise put the remote syslog IP here
123
+    define('LOG_SYSLOG_HOST', false);
124
+    // Syslog port
125
+    define('LOG_SYSLOG_PORT', 514);
126
+    // Program showed in the syslog. Useful if you have more than one instance login to the same syslog
127
+    define('LOG_SYSLOG_PROGRAM', 'z-push');
128
+    // Syslog facility - use LOG_USER when running on Windows
129
+    define('LOG_SYSLOG_FACILITY', LOG_LOCAL0);
130
+
100 131
     // Location of the trusted CA, e.g. '/etc/ssl/certs/EmailCA.pem'
101 132
     // Uncomment and modify the following line if the validation of the certificates fails.
102 133
     // define('CAINFO', '/etc/ssl/certs/EmailCA.pem');
@@ -113,6 +144,10 @@
113 144
     // true - allow older devices, but enforce policies on devices which support it
114 145
     define('LOOSE_PROVISIONING', false);
115 146
 
147
+    // The file containing the policies' settings.
148
+    // Set a full path or relative to the z-push main directory
149
+    define('PROVISIONING_POLICYFILE', 'policies.ini');
150
+
116 151
     // Default conflict preference
117 152
     // Some devices allow to set if the server or PIM (mobile)
118 153
     // should win in case of a synchronization conflict
@@ -135,11 +170,6 @@
135 170
     // a higher value if you have a high load on the server.
136 171
     define('PING_INTERVAL', 30);
137 172
 
138
-    // Interval in seconds to force a re-check of potentially missed notifications when
139
-    // using a changes sink. Default are 300 seconds (every 5 min).
140
-    // This can also be disabled by setting it to false
141
-    define('SINK_FORCERECHECK', 300);
142
-
143 173
     // Set the fileas (save as) order for contacts in the webaccess/webapp/outlook.
144 174
     // It will only affect new/modified contacts on the mobile which then are synced to the server.
145 175
     // Possible values are:
@@ -158,12 +188,14 @@
158 188
     // SYNC_FILEAS_LASTFIRST will be used
159 189
     define('FILEAS_ORDER', SYNC_FILEAS_LASTFIRST);
160 190
 
161
-    // Amount of items to be synchronized per request
191
+    // Maximum amount of items to be synchronized per request.
162 192
     // Normally this value is requested by the mobile. Common values are 5, 25, 50 or 100.
163 193
     // Exporting too much items can cause mobile timeout on busy systems.
164
-    // Z-Push will use the lowest value, either set here or by the mobile.
165
-    // default: 100 - value used if mobile does not limit amount of items
166
-    define('SYNC_MAX_ITEMS', 100);
194
+    // Z-Push will use the lowest provided value, either set here or by the mobile.
195
+    // MS Outlook 2013+ request up to 512 items to accelerate the sync process.
196
+    // If you detect high load (also on subsystems) you could try a lower setting.
197
+    // max: 512 - value used if mobile does not limit amount of items
198
+    define('SYNC_MAX_ITEMS', 512);
167 199
 
168 200
     // The devices usually send a list of supported properties for calendar and contact
169 201
     // items. If a device does not includes such a supported property in Sync request,
@@ -172,7 +204,7 @@
172 204
     // to tell if a property was deleted or it was not set at all if it does not appear in Sync.
173 205
     // This parameter defines Z-Push behaviour during Sync if a device does not issue a list with
174 206
     // supported properties.
175
-    // See also https://jira.zarafa.com/browse/ZP-302.
207
+    // See also https://jira.z-hub.io/browse/ZP-302.
176 208
     // Possible values:
177 209
     // false - do not unset properties which are not sent during Sync (default)
178 210
     // true  - unset properties which are not sent during Sync
@@ -182,58 +214,63 @@
182 214
     // in the semantic sanity checks and contacts with larger photos are not synchronized.
183 215
     // This limitation is not being followed by the ActiveSync clients which set much bigger
184 216
     // contact photos. You can override the default value of the max photo size.
185
-    // default: 49152 - 48 KB default max photo size in bytes
186
-    define('SYNC_CONTACTS_MAXPICTURESIZE', 49152);
217
+    // default: 5242880 - 5 MB default max photo size in bytes
218
+    define('SYNC_CONTACTS_MAXPICTURESIZE', 5242880);
219
+
220
+    // Over the WebserviceUsers command it is possible to retrieve a list of all
221
+    // known devices and users on this Z-Push system. The authenticated user needs to have
222
+    // admin rights and a public folder must exist.
223
+    // In multicompany environments this enable an admin user of any company to retrieve
224
+    // this full list, so this feature is disabled by default. Enable with care.
225
+    define('ALLOW_WEBSERVICE_USERS_ACCESS', false);
226
+
227
+    // Users with many folders can use the 'partial foldersync' feature, where the server
228
+    // actively stops processing the folder list if it takes too long. Other requests are
229
+    // then redirected to the FolderSync to synchronize the remaining items.
230
+    // Device compatibility for this procedure is not fully understood.
231
+    // NOTE: THIS IS AN EXPERIMENTAL FEATURE WHICH COULD PREVENT YOUR MOBILES FROM SYNCHRONIZING.
232
+    define('USE_PARTIAL_FOLDERSYNC', false);
233
+
234
+    // The minimum accepted time in second that a ping command should last.
235
+    // It is strongly advised to keep this config to false. Some device
236
+    // might not be able to send a higher value than the one specificied here and thus
237
+    // unable to start a push connection.
238
+    // If set to false, there will be no lower bound to the ping lifetime.
239
+    // The minimum accepted value is 1 second. The maximum accepted value is 3540 seconds (59 minutes).
240
+    define('PING_LOWER_BOUND_LIFETIME', false);
241
+
242
+    // The maximum accepted time in second that a ping command should last.
243
+    // If set to false, there will be no higher bound to the ping lifetime.
244
+    // The minimum accepted value is 1 second. The maximum accepted value is 3540 seconds (59 minutes).
245
+    define('PING_HIGHER_BOUND_LIFETIME', false);
246
+
247
+    // Maximum response time
248
+    // Mobiles implement different timeouts to their TCP/IP connections. Android devices for example
249
+    // have a hard timeout of 30 seconds. If the server is not able to answer a request within this timeframe,
250
+    // the answer will not be recieved and the device will send a new one overloading the server.
251
+    // There are three categories
252
+    //   - Short timeout  - server has up within 30 seconds - is automatically applied for not categorized types
253
+    //   - Medium timeout - server has up to 90 seconds to respond
254
+    //   - Long timeout   - server has up to 4 minutes to respond
255
+    // If a timeout is almost reached the server will break and sent the results it has until this
256
+    // point. You can add DeviceType strings to the categories.
257
+    // In general longer timeouts are better, because more data can be streamed at once.
258
+    define('SYNC_TIMEOUT_MEDIUM_DEVICETYPES', "SAMSUNGGTI");
259
+    define('SYNC_TIMEOUT_LONG_DEVICETYPES',   "iPod, iPad, iPhone, WP, WindowsOutlook, WindowsMail");
260
+
261
+    // Time in seconds the device should wait whenever the service is unavailable,
262
+    // e.g. when a backend service is unavailable.
263
+    // Z-Push sends a "Retry-After" header in the response with the here defined value.
264
+    // It is up to the device to respect or not this directive so even if this option is set,
265
+    // the device might not wait requested time frame.
266
+    // Number of seconds before retry, to disable set to: false
267
+    define('RETRY_AFTER_DELAY', 300);
187 268
 
188 269
 /**********************************************************************************
189 270
  *  Backend settings
190 271
  */
191 272
     // the backend data provider
192
-    define('BACKEND_PROVIDER', 'BackendIMAP');
193
-
194
-
195
-    // ************************
196
-    //  BackendZarafa settings
197
-    // ************************
198
-    // Defines the server to which we want to connect
199
-    define('MAPI_SERVER', 'file:///var/run/zarafa');
200
-
201
-
202
-    // ************************
203
-    //  BackendIMAP settings
204
-    // ************************
205
-    // Defines the server to which we want to connect
206
-    define('IMAP_SERVER', 'localhost');
207
-    // connecting to default port (143)
208
-    define('IMAP_PORT', 993);
209
-    // best cross-platform compatibility (see http://php.net/imap_open for options)
210
-    define('IMAP_OPTIONS', '/ssl/novalidate-cert');
211
-    // overwrite the "from" header if it isn't set when sending emails
212
-    // options: 'username'    - the username will be set (usefull if your login is equal to your emailaddress)
213
-    //        'domain'    - the value of the "domain" field is used
214
-    //        '@mydomain.com' - the username is used and the given string will be appended
215
-    define('IMAP_DEFAULTFROM', '');
216
-    // copy outgoing mail to this folder. If not set d-push will try the default folders
217
-    define('IMAP_SENTFOLDER', 'Sent');
218
-    // forward messages inline (default false - as attachment)
219
-    define('IMAP_INLINE_FORWARD', false);
220
-    // don't use imap_mail() to send emails.
221
-    // true (default, uses imap_mail, which is broken - false uses mail(),
222
-    // which handles cc and from in a more sane way)
223
-    define('IMAP_USE_IMAPMAIL', false);
224
-
225
-
226
-    // ************************
227
-    //  BackendMaildir settings
228
-    // ************************
229
-    define('MAILDIR_BASE', '/tmp');
230
-    define('MAILDIR_SUBDIR', 'Maildir');
231
-
232
-    // **********************
233
-    //  BackendVCardDir settings
234
-    // **********************
235
-    define('VCARDDIR_DIR', '/home/%u/.kde/share/apps/kabc/stdvcf');
236
-
273
+    define('BACKEND_PROVIDER', 'BackendCombined');
237 274
 
238 275
 /**********************************************************************************
239 276
  *  Search provider settings
@@ -251,6 +288,45 @@
251 288
     // might result in timeout. Default is 10.
252 289
     define('SEARCH_MAXRESULTS', 10);
253 290
 
291
+/**********************************************************************************
292
+ *  Kopano Outlook Extension - Settings
293
+ *
294
+ *  The Kopano Outlook Extension (KOE) provides MS Outlook 2013 and newer with
295
+ *  functionality not provided by ActiveSync or not implemented by Outlook.
296
+ *  For more information, see: https://wiki.z-hub.io/x/z4Aa
297
+ */
298
+    // Global Address Book functionality
299
+    define('KOE_CAPABILITY_GAB', true);
300
+    // Synchronize mail flags from the server to Outlook/KOE
301
+    define('KOE_CAPABILITY_RECEIVEFLAGS', true);
302
+    // Encode flags when sending from Outlook/KOE
303
+    define('KOE_CAPABILITY_SENDFLAGS', true);
304
+    // Out-of-office support
305
+    define('KOE_CAPABILITY_OOF', true);
306
+    // Out-of-office support with start & end times (superseeds KOE_CAPABILITY_OOF)
307
+    define('KOE_CAPABILITY_OOFTIMES', true);
308
+    // Notes support
309
+    define('KOE_CAPABILITY_NOTES', true);
310
+    // Shared folder support
311
+    define('KOE_CAPABILITY_SHAREDFOLDER', true);
312
+    // Send-As support for Outlook/KOE and mobiles
313
+    define('KOE_CAPABILITY_SENDAS', true);
314
+    // Secondary Contact folders (own and shared)
315
+    define('KOE_CAPABILITY_SECONDARYCONTACTS', true);
316
+    // Copy WebApp signature into KOE
317
+    define('KOE_CAPABILITY_SIGNATURES', true);
318
+    // Delivery receipt requests
319
+    define('KOE_CAPABILITY_RECEIPTS', true);
320
+    // Impersonate other users
321
+    define('KOE_CAPABILITY_IMPERSONATE', true);
322
+
323
+    // To synchronize the GAB KOE, the GAB store and folderid need to be specified.
324
+    // Use the gab-sync script to generate this data. The name needs to
325
+    // match the config of the gab-sync script.
326
+    // More information here: https://wiki.z-hub.io/x/z4Aa (GAB Sync Script)
327
+    define('KOE_GAB_STORE', 'SYSTEM');
328
+    define('KOE_GAB_FOLDERID', '');
329
+    define('KOE_GAB_NAME', 'Z-Push-KOE-GAB');
254 330
 
255 331
 /**********************************************************************************
256 332
  *  Synchronize additional folders to all mobiles
@@ -260,11 +336,11 @@
260 336
  *
261 337
  *  This feature is supported only by certain devices, like iPhones.
262 338
  *  Check the compatibility list for supported devices:
263
- *      http://z-push.sf.net/compatibility
339
+ *      http://z-push.org/compatibility
264 340
  *
265 341
  *  To synchronize a folder, add a section setting all parameters as below:
266 342
  *      store:      the ressource where the folder is located.
267
- *                  Zarafa users use 'SYSTEM' for the 'Public Folder'
343
+ *                  Kopano users use 'SYSTEM' for the 'Public Folder'
268 344
  *      folderid:   folder id of the folder to be synchronized
269 345
  *      name:       name to be displayed on the mobile device
270 346
  *      type:       supported types are:
@@ -272,13 +348,21 @@
272 348
  *                      SYNC_FOLDER_TYPE_USER_APPOINTMENT
273 349
  *                      SYNC_FOLDER_TYPE_USER_TASK
274 350
  *                      SYNC_FOLDER_TYPE_USER_MAIL
351
+ *                      SYNC_FOLDER_TYPE_USER_NOTE
352
+ *      flags:      sets additional options on the shared folder. Supported are:
353
+ *                      DeviceManager::FLD_FLAGS_NONE
354
+ *                          No flags configured, default flag to be set
355
+ *                      DeviceManager::FLD_FLAGS_SENDASOWNER
356
+ *                          When replying in this folder, automatically do Send-As
357
+ *                      DeviceManager::FLD_FLAGS_CALENDARREMINDERS
358
+ *                          If set, Outlook shows reminders for these shares with KOE
275 359
  *
276 360
  *  Additional notes:
277
- *  - on Zarafa systems use backend/zarafa/listfolders.php script to get a list
361
+ *  - on Kopano systems use backend/kopano/listfolders.php script to get a list
278 362
  *    of available folders
279 363
  *
280
- *  - all Z-Push users must have full writing permissions (secretary rights) so
281
- *    the configured folders can be synchronized to the mobile
364
+ *  - all Z-Push users must have at least reading permissions so the configured
365
+ *    folders can be synchronized to the mobile. Else they are ignored.
282 366
  *
283 367
  *  - this feature is only partly suitable for multi-tenancy environments,
284 368
  *    as ALL users from ALL tenents need access to the configured store & folder.
@@ -299,8 +383,7 @@
299 383
             'folderid'  => "",
300 384
             'name'      => "Public Contacts",
301 385
             'type'      => SYNC_FOLDER_TYPE_USER_CONTACT,
386
+            'flags'     => DeviceManager::FLD_FLAGS_NONE,
302 387
         ),
303 388
 */
304 389
     );
305
-
306
-?>

Loading…
Annulla
Salva