ActiveSync Z-push install steps 1-13, or scripted

  1. # yum install -y php-cli php-soap php-process php-mbstring php-imap
  2. # wget http://download.z-push.org/final/2.3/z-push-2.3.8.tar.gz
  3. # tar zxvf z-push-2.3.8.tar.gz
  4. # mkdir -p /var/lib/z-push /var/log/z-push /usr/share/z-push
  5. # chmod 755 /var/lib/z-push /var/log/z-push
  6. # chown apache:apache /var/lib/z-push /var/log/z-push
  7. # cp -R z-push-2.3.8/* /usr/share/z-push
  8. # perl -pi -e 's#'\''IMAP_FOLDER_CONFIGURED'\'', false#'\''IMAP_FOLDER_CONFIGURED'\'', true#g' /usr/share/z-push/backend/imap/config.php
  9. # perl -pi -e 's#'\''TIMEZONE'\'', '\'''\''#'\''TIMEZONE'\'', '\''America/Denver'\''#g' /usr/share/z-push/config.php
  10. # perl -pi -e 's#'\''BACKEND_PROVIDER'\'', '\'''\''#'\''BACKEND_PROVIDER'\'', '\''BackendIMAP'\''#g' /usr/share/z-push/config.php
  11. Copy and paste into terminal all red text below and hit <Enter>
  12. # tee -a /etc/httpd/conf.d/z-push.conf <<END
  13. #
    # Z-push
    #
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    # Z-Push - ActiveSync over-the-air - default Apache configuration
    <IfModule mod_alias.c>
        Alias /Microsoft-Server-ActiveSync /usr/share/z-push/index.php
     </IfModule>
    
     <Directory /usr/share/z-push>
       # Don't list a directory index, follow symlinks (maybe state dir is somewhere linked)
       DirectoryIndex index.php
       Options -Indexes +FollowSymLinks
    
       # Z-push requirements
       php_value magic_quotes_gpc off
       php_value magic_quotes_runtime off
       php_value register_globals off
       php_value short_open_tag on
    
       # Optional
       # php_value display_errors off
       php_admin_flag safe_mode off
    
       # Setting memory limit higher (larger attachments)
       php_value memory_limit 128M
    
       # Security
       # Don't allow .htaccess Overrides, disallow access to files
       AllowOverride none
        <IfModule !mod_authz_core.c>
           Order allow,deny
           allow from all
        </IfModule>
        <IfModule mod_authz_core.c>
           Require all granted
        </IfModule>
    
        <Files "config.php">
           <IfModule !mod_authz_core.c>
             Deny from All
           </IfModule>
           <IfModule mod_authz_core.c>
             Require all denied
           </IfModule>
        </Files>
    </Directory>
    
    END

  14. # service httpd restart / systemctl restart httpd
  15. Configure Outlook email client on tablet or phone (Tested: Samsung Galaxy Tab S2, and Samsung S7 Edge, iPhone X)
    1. On tablet or smart phone open Outlook
    2. Go to 'Add Accout'
    3. Go to 'Add an email account'
    4. Enter email address
    5. Go to 'Manual setup'
    6. Select 'Exchange'
    7. Go to 'Advanced Setup'
    8. Enter email account (client@domain.com) -> Next
    9. Enter mail server -> (mail.domain.com) -> Next
    10. Enter domain\username (client@domain.com) -> Next
    11. Enter password (password) -> Next -> Done
    12. Connect (on mine its a check mark, select it)
    13. Outlook (Exchange) should sync now

Tested on CentOS 6/7.