bayardis wrote:Hmm ok. Do you know if anyone has used z-push and sogo together? Sogo's documentation seems to imply I need to use ocsmanager but from what I see Iredadmin didn't use openxchange with sogo so I'm a little confused how the Activesync is working
 I've managed to make Autodiscover work with z-push with the following configuration: Centos7, iRedMail-0.9.8, SOGo nightly build. Install and configure iRedMail first and setup SSL certificate with all hostnames necessary.
Get latest tarball release of z-push (I used 2.3.9) and put the files in the usual location /usr/share/z-push.Create log folder /var/log/z-push. 
Configure z-push: in the main configuration file /usr/share/z-push/config.php set define('BACKEND_PROVIDER', 'BackendIMAP');
In autodiscover/config.php - define('ZPUSH_HOST', 'mailhost.yourdomain.com');
Create /etc/nginx/templates/autodiscover.tmpl with:
include         fastcgi_params;
fastcgi_index   index.php;
fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param   REQUEST_URI $1;
fastcgi_param   PHP_FLAG "magic_quotes_gpc=off \n register_globals=off \n magic_quotes_runtime=off \n short_open_tag=on";
fastcgi_param   PHP_VALUE "post_max_size=20M \n upload_max_filesize=20M \n max_execution_time=3660";
fastcgi_param   HTTP_PROXY ""; # Mitigate https://httpoxy.org/ vulnerabilities
fastcgi_read_timeout 3660; # Z-Push Ping might run 3600s, but to be safe
location ~* /AutoDiscover/AutoDiscover.xml {
    alias       /usr/share/z-push/autodiscover/autodiscover.php;
    access_log  /var/log/nginx/z-push-autodiscover-access.log;
    error_log   /var/log/nginx/z-push-autodiscover-error.log;
    fastcgi_pass    unix:/var/run/php-fpm.socket;
    fastcgi_index   autodiscover.php;
}
Edit /etc/nginx/sites-enabled/00-default-ssl.conf adding a line:
include /etc/nginx/templates/autodiscover.tmpl;
Edit /etc/nginx/templates/ssl.tmpl and change ssl_protocols to
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
Don't forget the autodiscover DNS record and you should be all set.