Install and configure the mail-account plugin

General

At first, install the UI plugin open-xchange-gui-mail-accounts-plugin from the update tree. The plugin will install into the default UI plugin folder, e.g. /var/www/ox6/plugins/com.openexchange.mail.accounts/ on debian. This plugin has no server component. It's registered by automatically adding its name to plugins/static.conf during post installation. UI updates do not replace this file.

Install on OX AppSuite

Debian GNU/Linux 10.0

Add the following entry to /etc/apt/sources.list.d/open-xchange.list if not already present:

deb https://software.open-xchange.com/products/updates/DebianBuster/ /
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# deb https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/updates/updates/DebianBuster/ /

and run

$ apt-get update
$ apt-get install open-xchange-gui-mail-accounts-plugin

Debian GNU/Linux 11.0

Add the following entry to /etc/apt/sources.list.d/open-xchange.list if not already present:

deb https://software.open-xchange.com/products/updates/DebianBullseye/ /
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# deb https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/updates/updates/DebianBullseye/ /

and run

$ apt-get update
$ apt-get install open-xchange-gui-mail-accounts-plugin


Define services

Inside the plugin folder (see above), you will find the configuration file services/config.js. This file contains all services that you want to provide to your customers. Syntactically it's plain JavaScript and from the syntax perspective it's quite self-explaining. Here's an example of how to define just one single service, in this case it's "GoogleMail":

ox.mail.services = {
   gmail: {
       // Google Mail
       name: "Google Mail",
       domains: ["gmail.com", "googlemail.com"],
       products: {
           imap: {
               name: "IMAP",
               transport_server: "smtp.gmail.com",
               mail_protocol: "imap",
               mail_server: "imap.gmail.com"
           },
           pop: {
               name: "POP3",
               transport_server: "smtp.gmail.com",
               mail_server: "pop.gmail.com"
           }
       },
       description: "In order to use your GMail account, you have to enable ....", /*i18n*/
       logo: {
           src: "gmail.png",
           height: "59px"
       }
   }
};

Each service has an unique id ("gmail"), a name which appears in the UI ("Google Mail"), a list of domains this service supports ("gmail.com" and "googlemail.com"), a description (for example help the user at figuring out how to enable POP3), as well as a logo and the color of the name (e.g. #E20074 for telecom magenta).

Moreover, each service has products instead of just differentiating IMAP from POP3. Some hosters have a huge set of different types of mail accounts (free, secure, fast, premium, business etc.) independent of the technical perspective (i.e. IMAP or POP3).

Each product has an unique id. The following fields are available:

Field Description / defaults
name appears in the UI
transport_protocol default is "smtp"
transport_server IP or domain
transport_port 25 or 465 (ssl)
transport_auth use authentication
transport_auth_short cut off domain part, "me" instead of "me@domain.tld"
transport_secure use SSL
mail_protocol "imap" or "pop3". default "pop3"
mail_server IP or domain
mail_port defaults: 110 (pop3), 995 (pop3/ssl), 143 (imap), 993 (imap/ssl)
mail_auth_short same as transport_auth_short
mail_secure use SSL

Enable specific services only / Cascading Config

Furthermore, the plugin will look for a particular configuration path, that is "ui/mail/services/enabled". If this path exists, you can control which services are enabled by the backend. In order to do so, you can add the following to /opt/open-xchange/etc/groupware/settings/ui.properties , for example:

ui/mail/services/enabled/gmail = true
ui/mail/services/enabled/t_online = true

In this case only two services are enabled. All other services that might be defined in /<plugindir>/services/config.js will be ignored. This configuration supports the Cascading-Configuration, i.e. you can set values for different contexts or context groups. This, of course, requires a proper YAML file.