Z-Push with Zimbra and HTML Support: Difference between revisions
m (→Apache Config (SSL): Minor wording change) |
(Removed GoogleAdLinkUnitBanner) |
||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__TOC__ | |||
Z-Push | {| class="vwiki-boxout" | ||
|- | |||
| All the information for the procedure below was gleamed from [http://www.zimbra.com/forums/mobility/26536-z-push-zimbra-backend-push-email-contacts-appointments-tasks.html Z-Push Zimbra Backend (Push Email, Contacts, Appointments & Tasks) - Zimbra :: Forums]. | |||
Its a mammoth thread, but you can search just that thread to find what you need. If you run into problems, search it, even if there isn't an exact match you'll find some useful pointers. | |||
Failing that, you could try the [[Troubleshooting_(Z-Push)|Troubleshooting]] page on this vWiki (its not particularly developed yet) or the [http://sourceforge.net/tracker/?group_id=275320&atid=1169730 Z-Push Zimbra Backend Support Requests] page on SourceForge.net. | |||
|} | |||
Be aware that the AS 12.1 branch of Z-Push v1 (and the Zimbra backend), which this page covers, are not officially supported (but in general they seem to work well for most people). | |||
'''Z-Push v2, which fully supports HTML email, has now been released. See [[Z-Push v2 with Zimbra]] for install instructions.''' | |||
== Procedure == | |||
This procedure should get you up and running so you can sync your mobile device to your Zimbra server using Active-Sync, complete with proper HTML emails. | |||
It doesn't include setting up provisioning, which is the AS feature that enhances security by providing a mechanism to remote wipe your devices, enforce storage encryption etc. See the forum thread above if you want to know how to set it up. | |||
'''It's not recommended that you try to run Z-Push on the same server as Zimbra.''' | {| class="vwiki-note" | ||
|- | |||
| '''It's not recommended that you try to run Z-Push on the same server as Zimbra.''' | |||
|- | |||
| It is possible, but will require you to hack your Zimbra installation, and performing a Zimbra upgrade will probably break Z-Push. | |||
If you must do it, then your best bet is to install on separate server first. Then, once you know you've got a working installation, try to get Z-Push running on your Zimbra server. | |||
|} | |||
The following procedure assumes that you have a web-server that's accessible from the internet. Mine is an [http://httpd.apache.org/ Apache2] webserver, running on [http://releases.ubuntu.com/lucid/ Ubuntu 10.04 LTS], therefore any references to commands, paths, etc, will have come from that set-up. | The following procedure assumes that you have a web-server that's accessible from the internet. Mine is an [http://httpd.apache.org/ Apache2] webserver, running on [http://releases.ubuntu.com/lucid/ Ubuntu 10.04 LTS], therefore any references to commands, paths, etc, will have come from that set-up. | ||
Line 48: | Line 59: | ||
# Browse to your server, eg http://as.domain.com/Microsoft-Server-ActiveSync | # Browse to your server, eg http://as.domain.com/Microsoft-Server-ActiveSync | ||
#* You should be prompted for a username and password (for an account on your Zimbra server) | #* You should be prompted for a username and password (for an account on your Zimbra server) | ||
#* If not, | #* If not, Apache has failed to deliver the prompt to you. Check the webserver log, either your website isn't configured correctly or Z-Push experienced a PHP error. | ||
# Enter a valid Zimbra user/pass | # Enter a valid Zimbra user/pass | ||
#* You should get a "GET not supported" page | #* You should get a "GET not supported" page - this confirms that connectivity exists between all the required components (Apache, Z-Push, Zimbra), and that they are basically OK. | ||
'''In case of problems check your Apache error log, and the z-push debug logs. Fix any Apache errors 1st.''' | '''In case of problems check your Apache error log, and the z-push debug logs. Fix any Apache errors 1st.''' | ||
If you think there might be an error in the procedure or similar query, pls feel free to post a comment on my blog post of setting up Z-Push with Zimbra - [http://vblog.strutt.org.uk/2012/03/z-push-v1-with-html-activesync-for-zimbra-foss]. | |||
=== Z-Push Config === | === Z-Push Config === | ||
Line 75: | Line 88: | ||
=== Apache Config (Normal) === | === Apache Config (Normal) === | ||
Update as required, at minimum you'll need to change the hostname to whatever your web server is (the <code>ServerAdmin</code> and <code>ServerName</code> parameters). | Update as required, at minimum you'll need to change the hostname to whatever your web server is (the <code>ServerAdmin</code> and <code>ServerName</code> parameters). | ||
< | <source lang="apache"> | ||
<VirtualHost *:80> | <VirtualHost *:80> | ||
ServerAdmin info@as.domain.com | ServerAdmin info@as.domain.com | ||
Line 82: | Line 95: | ||
# Indexes + Directory Root. | # Indexes + Directory Root. | ||
DirectoryIndex index.php | DirectoryIndex index.php | ||
DocumentRoot /var/www/z- | DocumentRoot /var/www/z-push/ | ||
Alias /Microsoft-Server-ActiveSync /var/www/z- | Alias /Microsoft-Server-ActiveSync /var/www/z-push/index.php | ||
<Directory /> | <Directory /> | ||
Line 95: | Line 108: | ||
# Logfiles | # Logfiles | ||
ErrorLog /var/log/apache2/z- | ErrorLog /var/log/apache2/z-push/error.log | ||
CustomLog /var/log/apache2/z- | CustomLog /var/log/apache2/z-push/access.log combined | ||
</VirtualHost> | </VirtualHost> | ||
</ | </source> | ||
=== Apache Config (SSL) === | === Apache Config (SSL) === | ||
Line 110: | Line 123: | ||
* <code>SSLCACertificateFile</code> | * <code>SSLCACertificateFile</code> | ||
For more info on setting up a secure website see [[Secure Website]]. | For more info on setting up a secure website see [[Secure Website]]. | ||
<source lang="apache"> | |||
<IfModule mod_ssl.c> | |||
<VirtualHost _default_:443> | <VirtualHost _default_:443> | ||
ServerAdmin info@as.domain.com | ServerAdmin info@as.domain.com | ||
Line 117: | Line 131: | ||
# Indexes + Directory Root. | # Indexes + Directory Root. | ||
DirectoryIndex index.php | DirectoryIndex index.php | ||
DocumentRoot /var/www/z- | DocumentRoot /var/www/z-push/ | ||
Alias /Microsoft-Server-ActiveSync /var/www/z- | Alias /Microsoft-Server-ActiveSync /var/www/z-push/index.php | ||
<Directory /> | <Directory /> | ||
Line 130: | Line 144: | ||
# Logfiles | # Logfiles | ||
ErrorLog /var/log/apache2/z- | ErrorLog /var/log/apache2/z-push/error.log | ||
CustomLog /var/log/apache2/z- | CustomLog /var/log/apache2/z-push/access.log combined | ||
# SSL Engine Switch: | # SSL Engine Switch: | ||
Line 150: | Line 164: | ||
</VirtualHost> | </VirtualHost> | ||
</IfModule> | |||
</source> | |||
== Android Account Set-Up == | |||
# In the ''Set up email'' screen | # In the ''Set up email'' screen | ||
#* Enter your account email address and password and select '''Manual setup''' | #* Enter your account email address and password and select '''Manual setup''' | ||
Line 168: | Line 183: | ||
[[Category:Zimbra]] | [[Category:Zimbra]] | ||
[[Category:Z-Push]] | [[Category:Z-Push]] | ||
[[Category:Applications]] |
Latest revision as of 13:33, 26 September 2016
All the information for the procedure below was gleamed from Z-Push Zimbra Backend (Push Email, Contacts, Appointments & Tasks) - Zimbra :: Forums.
Its a mammoth thread, but you can search just that thread to find what you need. If you run into problems, search it, even if there isn't an exact match you'll find some useful pointers. Failing that, you could try the Troubleshooting page on this vWiki (its not particularly developed yet) or the Z-Push Zimbra Backend Support Requests page on SourceForge.net. |
Be aware that the AS 12.1 branch of Z-Push v1 (and the Zimbra backend), which this page covers, are not officially supported (but in general they seem to work well for most people).
Z-Push v2, which fully supports HTML email, has now been released. See Z-Push v2 with Zimbra for install instructions.
Procedure
This procedure should get you up and running so you can sync your mobile device to your Zimbra server using Active-Sync, complete with proper HTML emails.
It doesn't include setting up provisioning, which is the AS feature that enhances security by providing a mechanism to remote wipe your devices, enforce storage encryption etc. See the forum thread above if you want to know how to set it up.
It's not recommended that you try to run Z-Push on the same server as Zimbra. |
It is possible, but will require you to hack your Zimbra installation, and performing a Zimbra upgrade will probably break Z-Push.
If you must do it, then your best bet is to install on separate server first. Then, once you know you've got a working installation, try to get Z-Push running on your Zimbra server. |
The following procedure assumes that you have a web-server that's accessible from the internet. Mine is an Apache2 webserver, running on Ubuntu 10.04 LTS, therefore any references to commands, paths, etc, will have come from that set-up.
- If you don't have them, install subversion and php-curl
apt-get install subversion php5-curl
- Create a folder for Z-Push on your webserver
- EG
mkdir /var/www/z-push
- EG
- Download the Z-Push Active-Sync 12.1 branch to the folder
- EG
svn checkout svn://svn.berlios.de/z-push/branches/as12.1 /var/www/z-push
- EG
- Download the Zimbra Active-Sync 12.1 backend branch into a
/zimbra
folder- EG
mkdir /var/www/z-push/zimbra
- EG
svn checkout https://zimbrabackend.svn.sourceforge.net/svnroot/zimbrabackend/zimbra-backend/branches/as12.1 /var/www/z-push/zimbra
- EG
- Move unrequired files out of
backend
, leaving onlybackend.php
anddiffbackend.php
- EG
mkdir /var/www/z-push/backend-old
- EG
mv /var/www/z-push/backend/* /var/www/z-push/backend-old
- EG
mv /var/www/z-push/backend-old/backend.php /var/www/z-push/backend/
- EG
mv /var/www/z-push/backend-old/diffbackend.php /var/www/z-push/backend/
- EG
- Move the
zimbra.php
file intobackend
- EG
mv /var/www/z-push/zimbra/zimbra.php /var/www/z-push/backend/
- EG
- Allow write access to the
state
folder- EG
chgrp www-data /var/www/z-push/state
- EG
chmod g+w /var/www/z-push/state
- EG
- Create file for debug to go to
- EG
touch /var/www/z-push/debug.txt
- EG
chmod 777 /var/www/z-push/debug.txt
- EG
- Update the
config.php
file as required (see example below - Z-Push Config) - Create an Apache2 config file for the Active-Sync website (see below for example normal and SSL configs), and enable
- EG
vi /etc/apache2/sites-available/z-push
- EG
cd /etc/apache2/sites-enabled
- EG
ln -s ../sites-available/z-push z-push
service apache2 restart
- EG
In theory, it should be working now, in order to test...
- Browse to your server, eg http://as.domain.com/Microsoft-Server-ActiveSync
- You should be prompted for a username and password (for an account on your Zimbra server)
- If not, Apache has failed to deliver the prompt to you. Check the webserver log, either your website isn't configured correctly or Z-Push experienced a PHP error.
- Enter a valid Zimbra user/pass
- You should get a "GET not supported" page - this confirms that connectivity exists between all the required components (Apache, Z-Push, Zimbra), and that they are basically OK.
In case of problems check your Apache error log, and the z-push debug logs. Fix any Apache errors 1st.
If you think there might be an error in the procedure or similar query, pls feel free to post a comment on my blog post of setting up Z-Push with Zimbra - [1].
Z-Push Config
# Update the following existing config lines
date_default_timezone_set("Europe/London"); # Or use whatever Unix style time-zone that's appropriate for you
define('PROVISIONING', false);
$BACKEND_PROVIDER = "BackendZimbra";
# Add the following config lines
define('ZIMBRA_DEBUG',true);
define('ZIMBRA_URL', 'https://mysserveraddress.com'); # Update with you Zimbra server hostname
define('ZIMBRA_USER_DIR', 'zimbra');
define('ZIMBRA_SYNC_CONTACT_PICTURES', true);
define('ZIMBRA_VIRTUAL_CONTACTS',true);
define('ZIMBRA_VIRTUAL_APPOINTMENTS',true);
define('ZIMBRA_VIRTUAL_TASKS',true);
define('ZIMBRA_IGNORE_EMAILED_CONTACTS',true);
define('ZIMBRA_HTML',true);
Apache Config (Normal)
Update as required, at minimum you'll need to change the hostname to whatever your web server is (the ServerAdmin
and ServerName
parameters).
<VirtualHost *:80>
ServerAdmin info@as.domain.com
ServerName as.domain.com
# Indexes + Directory Root.
DirectoryIndex index.php
DocumentRoot /var/www/z-push/
Alias /Microsoft-Server-ActiveSync /var/www/z-push/index.php
<Directory />
AllowOverride All
</Directory>
php_flag magic_quotes_gpc off
php_flag register_globals off
php_flag magic_quotes_runtime off
php_flag short_open_tag on
# Logfiles
ErrorLog /var/log/apache2/z-push/error.log
CustomLog /var/log/apache2/z-push/access.log combined
</VirtualHost>
Apache Config (SSL)
Update as required, at minimum you'll need to change the hostname to whatever your server has, and update the paths to your keys/certificates, so the following parameters...
ServerAdmin
ServerName
SSLCertificateFile
SSLCertificateKeyFile
SSLCertificateChainFile
SSLCACertificateFile
For more info on setting up a secure website see Secure Website.
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin info@as.domain.com
ServerName as.domain.com
# Indexes + Directory Root.
DirectoryIndex index.php
DocumentRoot /var/www/z-push/
Alias /Microsoft-Server-ActiveSync /var/www/z-push/index.php
<Directory />
AllowOverride None
</Directory>
php_flag magic_quotes_gpc off
php_flag register_globals off
php_flag magic_quotes_runtime off
php_flag short_open_tag on
# Logfiles
ErrorLog /var/log/apache2/z-push/error.log
CustomLog /var/log/apache2/z-push/access.log combined
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on
# Server Certificate:
SSLCertificateFile /etc/apache2/ssl/web.crt
# Server Private Key:
SSLCertificateKeyFile /etc/apache2/ssl/server.key
# Server Certificate Chain:
SSLCertificateChainFile /etc/apache2/ssl/ca.crt
# Certificate Authority (CA):
SSLCACertificateFile /etc/apache2/ssl/ca.crt
</VirtualHost>
</IfModule>
Android Account Set-Up
- In the Set up email screen
- Enter your account email address and password and select Manual setup
- Add email account screen
- Select Microsoft Exchange ActiveSync
- Exchange server settings screen
- Enter your server hostname in Exchange server
- Untick Use secure connection (SSL) if your Z-Push site is not secure (it should be!)
- Tick Accept all SSL certificates if your Z-Push site doesn't use certificates verifiable with an internet trusted CA (eg they're self-signed)
- Account options screen (your device will attempt to connect to your server and if successful will present these options)
- Untick Sync SMS
- Do not enable SMS sync (ever! - if you do/have, delete the account from your device and start again)
- Leave Emails retrieval size as is, otherwise you can set what you like
- Untick Sync SMS