AppSuite:OX Mail App

Revision as of 04:59, 29 May 2018 by Khgras (talk | contribs) (SUSE Linux Enterprise Server 12)


OX Mail v2

The OX Mail v2 is a companion app for OX App Suite, and brings the power of OX App Suite web-based email to your customers' mobile devices. The OX Mail v2 is a native app designed specifically for Android and iOS smartphones and tablets.

With a focus on security and user-experience, OX Mail v2 serves all your email needs on the go. Most notably you can answer and process mails even when you are offline, mails are synced when you go online. For completing addresses, OX Mail v2 uses the address book of the device along with all received and sent mails. When you have deleted an email by accident, you can easily undo that. Furthermore OX Mail v2 provides a list of known features such as pushing new emails onto your device, supporting mail folders, handling attachments, showing the number of unread email, and so on.

Key Benefits

  • Available for iOS and Android on both mobile and tablet devices.
  • Quick and easy onboarding.
  • Incoming emails are displayed instantly. Get notified about new mails instantly, depending the configuration of your server
  • Glimpse at messages with the help of teaser texts.
  • User-friendly, due to native design, with state of the art gestures.
  • Offline capable – answer and manage previously read emails offline. Everything is synchronized once you are online again.
  • Privacy features such as certificate pinning (Android only), securely stored credentials, securely stored email bodies, securely stored attachments and integration with Dovecot Anti-Abuse Shield.

This app is brought to you by Open-Xchange. You can choose between using our OX-branded app as part of your OX App Suite license or to order a version that is adapted to your brand and published under your name.


To use OX Mail v2 you need to be running OX App Suite v7.8.4 or above together with the new Mobile API Facade. The Facade module provides an API optimized for mobile use-cases.

OX App Suite v7.8.4

OX App Suite is a modular platform designed for Telcos, Hosters, and other Service Providers and delivers a wide range of cloud-based services. These include email, file sharing, collaborative document editing, document management, time management, cloud storage and metrics for monitoring end-user behavior. More information can be found at

The OX Mail v2 app requires at least OX App Suite version 7.8.4-rev22.

Mobile API Facade

The Mobile API Facade is a server component that brings the new native mobile mail apps together with the OX App Suite. We’ve built the facade based on the technology used and proven in the OX App Suite middleware. The facade is developed in Java, utilizing the OSGIFramework. Further information can be found at:

TLS 1.2

The communication between the OX Mail v2 app and its end points needs to be secured with TLS 1.2. Please make sure that your infrastructure is capable of handling TLS 1.2 HTTP requests without downgrading the connection.

Pricing, Availability and Branding

OX Mail v2 Availability

OX Mail will be available in May 2018.

Users will be able to download their respective client for their device from the corresponding app store free of charge. The availability of the various clients depends on the approval process of the store provider. Clients for iOS and Android will be made available from the App Store and Google Play. The availability of the various clients will be confirmed by Open-Xchange via the usual communication channels.

Please message, or contact Open-Xchange Sales, for more information and pricing details about OX Mail v2.

OX Mail v1 Availability

In accordance with the supported platform policy, Open-Xchange will discontinue maintenance and support for OX Mail v1.0 by end of Q1 2018. Existing customers with OX Mail v1.0 in their portfolio, please contact Open-Xchange Sales or send a mail to for further information.

There is no direct upgrade path for end users from the previous version of OX Mail to the latest. The OX Mail v1 is an online client and does not store anything locally. Therefore all email data is stored in App Suite and is immediately available in the OX Mail v2.

One exception is the custom signature. It is stored in the App Suite but is not used by the OX Mail v2. The custom signature is therefore not lost, but also not accessible anymore.

Branding for Partners and Customers

With OX Mail v2 it is possible for customers and partners to request the addition, and change, of a variety of branding elements in the app. This includes changing colors, graphical assets and icons.

For more information about branding, the cost of this service and what can be done please message, or contact Open-Xchange Sales.

Download & Installation

Installation of the Clients

The OX Mail v2 is available via the different App Stores for iOS and Android:

  • OX Mail v2 in Apple App Store
  • OX Mail v2 in GooglePlay

Installation of Mobile API Facade

Installation Guide and configuration options can be found under:

Download & Installation of Packages

OX Mail v2 is available with the following backend packages:

  • mobile-api-facade-restricted - The Mobile Api Facade bundle for Push Notification Service

Installation on the server varies depending on the underlying distribution, details are available in the following chapters.

Redhat Enterprise Linux 6 or CentOS 6

Add the following repositories to your Open-Xchange yum configuration:


and run

$ yum install mobile-api-facade-restricted

Redhat Enterprise Linux 7 or CentOS 7

Add the following repositories to your Open-Xchange yum configuration:


and run

$ yum install mobile-api-facade-restricted

Debian GNU/Linux 8.0 (Jessie)

Add the following repositories to your Open-Xchange apt configuration:


and run

$ apt-get update
$ apt-get install mobile-api-facade-restricted

SUSE Linux Enterprise Server 12

Add the following repositories to your Open-Xchange apt configuration:

$ zypper ar mobile-api-facade-restricted

and run

$ zypper ref
$ zypper install mobile-api-facade-restricted

Setup and Configuration

Setup Middleware Notifications

The existing push framework of the Open-Xchange Middleware has been extended by the capability to spawn "permanent" listeners for incoming new message deliveries. Up to that point the life cycle for a listener was bound to at least one active session, which is associated with a client that is allowed to receive push notifications.

With introduction of the previously mentioned capability, listeners can be started without the need for an existent session right on the start of an Open-Xchange Middleware node. In addition those permanent listeners are spread approximately even over capable cluster members as - dependent on the underlying implementation - a listener representation may open/hold resources (socket connections) in order to receive notifications about new message deliveries.

To prepare a certain Open-Xchange Middleware node to spawn permanent push listeners the following properties need to be configured in file '/opt/open-xchange/etc/':

  • com.openexchange.push.allowPermanentPush
    This is the general switch to enable/disable support for permanent listeners on a node. Thus needs to be set to "true"
  • com.openexchange.push.allowedClient
    Specify the comma-separated list of clients which are allowed to receive notifications about new mails, “open-xchange-mobile-api-facade*” should be added here if you plan to use for for the new OX Mail v2 apps.
  • com.openexchange.push.credstorage.enabled
    As permanent listeners are required to run without an active session, the credential storage can be used to store user credentials in installations that do not support a master authentication to the mail storage Hence, if the property com.openexchange.mail.passwordSource" ( is not set to "global" this property is required to be set to "true"
  • com.openexchange.push.credstorage.passcrypt
    This property is required if "com.openexchange.push.credstorage.enabled" is set to "true". It does specify the passphrase to use to symmetrically encrypt the stored credentials. The passphrase is required to be equal on each cluster member.
  • com.openexchange.push.credstorage.rdb
    Once the credential storage is enabled, Open-Xchange offers two ways of storing the user-associated login/password combination. In cluster memory (default) or persisted to database. While the first way ensures that no user credentials are persisted nowhere in the Open-Xchange installation, it has the big disadvantage the stored credentials are gone once the last cluster members gets shut-down. Therefore there is also the possibility to store the credentials inside the database. Of course, no matter where the credentials are stored, they are encrypted using the value from com.openexchange.push.credstorage.passcrypt" property

With setting the properties above the configuration on the Open-Xchange Middleware node is prepared to spawn permanent listeners.

Now an appropriate push bundle/package needs to be installed that supports spawning permanent listeners. Currently Open-Xchange ships with three implementations:

  • open-xchange-push-dovecot (also requires the optional open-xchange-rest package)
  • open-xchange-push-imapidle (Not recommended, therefore disabled for IMAP-IDLE by default. com.openexchange.push.imapidle.supportsPermanentListeners=false)
  • open-xchange-push-mailnotify

Putting all together the following execution flow is taken to decide whether permanent listeners are spawned or not:

Ox mail push configuration 2.png

To check at any time what listeners are currently running, there is a new command-line tool "/opt/open-xchange/sbin/listpushusers" that outputs the user-id/context-id pair along-side with the information if the listener is of permanent nature or bound to an active session:

Ox mail push configuration 3.png

An exemplary out put might look like:
~# /opt/open-xchange/sbin/listpushusers
user=249, context=1, permanent=true
user=402, context=1, permanent=true

Push Setup

The push setup requires a working OX App Suite and the Mobile API Facade.

Simply said the main purpose of the Mobile Push functionality is to register an OSGi event handler converting an incoming OSGi event with topic "com/openexchange/push" to an appropriate native push reaching the mobile device using either APN or GCM.

Setup Dovecot Push

Configuration of IMAP METADATA

Dovecot Push plug-in requires METADATA support on Dovecot side, but it should only be enabled for OX IMAP sessions and not for any other IMAP clients directly. Enabling can be done with e.g. the remote directive "remote { imap_metadata = yes }" and specifying the IP ranges of OX.

Dovecot supports the [METADATA extension (RFC 5464)], which allows per-mailbox, per-user data to be stored and accessed via IMAP commands.

To activate metadata storage, a dictionary needs to be configured in the Dovecot configuration using the {{{mail_attribute_dict}}} option.

To activate the IMAP METADATA commands, the imap_metadata and mail_attribute_dict options need to be activated.


# Store METADATA information within user's Maildir directory
mail_attribute_dict = file:%h/Maildir/dovecot-attributes

protocol imap {
imap_metadata = yes

The following picture should demonstrate how the overall communication flow between OX Mail v2, Open-Xchange Middleware, and the Dovecot Push plug-in takes place. That communication flow requires the "open-xchange-push-dovecot" and "open-xchange-rest" packages to be installed on the Open-Xchange Middleware nodes and the Dovecot "http-notify" plug-in.

Ox mail push configuration 4.png

Once the Open-Xchange Mail v2 is installed on the user’s mobile device and it is allowed to show notifications about a new message delivery, the OX Mail v2 performs a subscription call to the Open-Xchange Middleware Servers using a fully authenticated session.

When the "open-xchange-push-dovecot" package is installed, the previous subscribe call requests it to spawn a permanent listener. Such a listener simply tells the Dovecot server to notify about new message delivery events for the associated user by executing a special SETMETADATA command. Hence, it does not open or use any resources other than firing a single IMAP command to the Dovecot IMAP Server.

Whenever a "new message delivery" event occurs, the Dovecot Server performs a HTTP callback against a configurable HTTP end-point of the Open-Xchange Middleware providing crucial information about the newly delivered message with a simple JSON body. That incoming HTTP callback is then turned into an appropriate OSGi event with topic "com/openexchange/push".

That event is in turn handled by the Mobile Push event handler, which uses the event’s information to request an APN/GCM push to the mobile device.

Configuration of Dovecot "http-notify" plug-in

To use push notifications, both the "notify" and the "push_notification" plugins need to be activated. For LMTP delivery, this is required:

protocol lmtp {
mail_plugins = $mail_plugins notify push_notification

If you also want push notifications to work for LDA-based delivery, you would need additional configuration:

protocol lda {
mail_plugins = $mail_plugins notify push_notification

The HTTP end-point (URL + authentication information) to use is configured in the Dovecot configuration file. The appropriate configuration options will contain the HTTP URL denoting the end-point to connect to as well as the authentication information for Basic Authentication as configured by properties "" and "". The URL to configure in Dovecot configuration follows this pattern.

<http|https> + "://" + <login> + ":" + <password> + "@" + <host> + ":" + <port> + "/preliminary/http-notify/v1/notify"


plugin {
push_notification_driver = ox:url=http://login:pass@node1.domain.tld:8009/preliminary/http-notify/v1/notify

Furthermore, it is also possible to specify more than one HTTP end-point to connect to if a new message delivery occurs. Thus the configuration section mentioned above may be extended by additional "push_notification_driver" entries; e.g. push_notification_driver2, push_notification_driver3, etc.

Please note that the path "/preliminary/http-notify/v1/notify" denotes the internal REST API of the Open-Xchange Middleware, which is not publicly accessible. The administrator can decide whether to add that path to the Apache configuration (see also AppSuite:Apache_Configuration and AppSuite:Grizzly) through a Location/ProxyPass directive:

<Location /preliminary>
Order Deny,Allow
Deny from all
# Only allow access from servers within the network. Do not expose this
# location outside of your network. In case you use a load balancing service in front
# of your Apache infrastructure you should make sure that access to /preliminary will
# be blocked from the internet / outside clients. Examples:
# Allow from
# Allow from
# Allow from 192.168.0.
ProxyPass /preliminary balancer://oxcluster/preliminary

In case the "user=" sent by OX in the push_notification_driver url data does not match the IMAP login of a user, Dovecot ignores it. This can be overridden by defining "user_from_metadata" in the push_notification_driver url, e.g.

push_notification_driver = ox:url= user_from_metadata

Setup App Notifications

There are two possible ways to setup notifications for new mails from the Middleware to the new OX Mail v2 apps. One is to install the push configuration provideded in the open-change-mobile-api-facade-push-certificates pacakge, the other is to configure everything manually.

Push configuration provided by package

To be able to use the push configuration provideded in the open-change-mobile-api-facade-push-certificates pacakge its needed to enabled push notifications for Android and iOS in general first. This can be done in the file '':

  • com.openexchange.pns.transport.apn.ios.enabled
    General switch to enable/disable push notifications for iOS using the Apple APN service
  • com.openexchange.pns.transport.gcm.enabled
    General switch to enable/disable push notifications for iOS using the Google FCM service

Manually configuring push configurations

To manually configure push configurations for Android you need to configure a service key in the Google Firebase developer console, for iOS you need to request a certificate for push notifications in the Apple developer console.

Generally push notifications for both platforms needs to be enabled in the file '':

  • com.openexchange.pns.transport.apn.ios.enabled
    General switch to enable/disable push notifications for iOS using the Apple APN service
  • com.openexchange.pns.transport.gcm.enabled
    General switch to enable/disable push notifications for iOS using the Google FCM service

For Android the file 'pns-gcm-options.yml' needs to contain the following snippet with the proper server key: open-xchange-mobile-api-facade:

   enabled: true
   key: 1234567890123456789012345678901234567890

For Apple iOS the file 'pns-apns-options.yml' needs to contain the following snippet with the proper values:

    enabled: true
    keystore: /opt/open-xchange/etc/apns-certificate.p12
    password: 12345678
    production: true

The identifier 'open-xchange-mobile-api-facade' might be different. When we provide multiple branded apps connecting to the same servers we append a specific string per brand, e.g. 'open-xchange-mobile-api-facade-brand1' and 'open-xchange-mobile-api-facade-brand2'.

Known Limitations


Starting with version v7.8.4 the OX App Suite supports flagging modes described here: There are four different modes defined. These modes describe the handling of the IMAP FLAGGED flag and color flagging and how both work together. The OX Mail v2 support only two modes, "Flagged only" and "Flagged implicit". All users using the OX Mail v2 should be provisioned with one of these modes. The other two modes, "Color only" and "Flagged and color" are not supported currently and might cause bad user experience when the app is used in conjunction with other mail user agents.


The settings from the OX App Suite are not used by the OX Mail v2 app. This includes the signature so that it has to be maintained manually both in the OX App Suite and the OX Mail v2 app. Settings are also only available locally and not synced when using the app on multiple devices.

Multiple Account Support

This version of the OX Mail v2 app does not support the use of multiple accounts. The consequence is that only the primary OX App Suite account is usable from the app.


The used backend should support RFC 5256 in order for the app to show threads correctly. Dovecot is supporting this RFC out of the box. If the backend doesn't support RCF 5256 its possible to disable to disable threading support in the Mobile API Facade by configuring the following property in