1

Topic: autodiscover for activesync

- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: centos 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx):nginx
- Manage mail accounts with iRedAdmin-Pro? yes

I have a question related to the sogo that comes with iredadmin. Does it support the autodiscover of outlook that sogo provides or is that something that has to be done manually? I couldn't find anything running on port 5000 as the sogo documentation mentioned.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: autodiscover for activesync

You have to do it manually.

3

Re: autodiscover for activesync

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

4

Re: autodiscover for activesync

It's partly mentioned in our documents used to setup MUA:
http://www.iredmail.org/docs/activesync.outlook.html

There're several protocols behind ActiveSync:

- EAS (Exchange ActiveSync)
- EWS (Exchange Web Service)
- MAPI

SOGo offers EAS support natively, no additional packages required. With SOGo + OpenChange + Samba4 integration, SOGo supports MAPI also, that means it supports old Outlook versions.

5 (edited by radonm 2018-12-14 06:09:33)

Re: autodiscover for activesync

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.

6

Re: autodiscover for activesync

radonm wrote:
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.

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;
Don't forget the autodiscover DNS record and you should be all set.

Thanks for that info. If I go back to iredadmin I will try it but I switched to mailcow now for evaluation and so far unlikely to go back.

7

Re: autodiscover for activesync

radonm wrote:

I've managed to make Autodiscover work with z-push with the following configuration:

Thanks for sharing. smile

8

Re: autodiscover for activesync

radonm wrote:
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.

Excellent, thank you for sharing!