Install and configure the mail-account plugin
Contents
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 8.0
Add the following entry to /etc/apt/sources.list.d/open-xchange.list if not already present:
deb https://software.open-xchange.com/OX6/updates/DebianJessie/ /
# 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/OX6/updates/updates/DebianJessie/ /
and run
$ apt-get update $ apt-get install open-xchange-gui-mail-accounts-plugin
Debian GNU/Linux 9.0
Add the following entry to /etc/apt/sources.list.d/open-xchange.list if not already present:
deb https://software.open-xchange.com/OX6/updates/DebianStretch/ /
# 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/OX6/updates/updates/DebianStretch/ /
and run
$ apt-get update $ apt-get install open-xchange-gui-mail-accounts-plugin
SUSE Linux Enterprise Server 12
Add the package repository using zypper if not already present:
$ zypper ar https://software.open-xchange.com/OX6/updates/SLE_12 ox
If you have a valid maintenance subscription, please run the following command and add the ldb account data to the url so that the most recent packages get installed:
$ zypper ar https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/OX6/updates/updates/SLES11 ox-updates
and run
$ zypper ref $ zypper in open-xchange-gui-mail-accounts-plugin
RedHat Enterprise Linux 6
Start a console and create a software repository file if not already present:
$ vim /etc/yum.repos.d/ox.repo
[ox]
name=Open-Xchange
baseurl=https://software.open-xchange.com/OX6/updates/RHEL6/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m
# 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
# [ox-updates]
# name=Open-Xchange Updates
# baseurl=https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/OX6/updates/updates/RHEL6/
# gpgkey=https://software.open-xchange.com/oxbuildkey.pub
# enabled=1
# gpgcheck=1
# metadata_expire=0m
and run
$ yum update $ yum install open-xchange-gui-mail-accounts-plugin
RedHat Enterprise Linux 7
Start a console and create a software repository file if not already present:
$ vim /etc/yum.repos.d/ox.repo
[ox]
name=Open-Xchange
baseurl=https://software.open-xchange.com/OX6/updates/RHEL7/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m
# 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
# [ox-updates]
# name=Open-Xchange Updates
# baseurl=https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/OX6/updates/updates/RHEL7/
# gpgkey=https://software.open-xchange.com/oxbuildkey.pub
# enabled=1
# gpgcheck=1
# metadata_expire=0m
and run
$ yum update $ yum install open-xchange-gui-mail-accounts-plugin
CentOS 6
Start a console and create a software repository file if not already present:
$ vim /etc/yum.repos.d/ox.repo
[ox]
name=Open-Xchange
baseurl=https://software.open-xchange.com/OX6/updates/RHEL6/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m
# 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
# [ox-updates]
# name=Open-Xchange Updates
# baseurl=https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/OX6/updates/updates/RHEL6/
# gpgkey=https://software.open-xchange.com/oxbuildkey.pub
# enabled=1
# gpgcheck=1
# metadata_expire=0m
and run
$ yum update $ yum install open-xchange-gui-mail-accounts-plugin
CentOS 7
Start a console and create a software repository file if not already present:
$ vim /etc/yum.repos.d/ox.repo
[ox]
name=Open-Xchange
baseurl=https://software.open-xchange.com/OX6/updates/RHEL7/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m
# 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
# [ox-updates]
# name=Open-Xchange Updates
# baseurl=https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/OX6/updates/updates/RHEL7/
# gpgkey=https://software.open-xchange.com/oxbuildkey.pub
# enabled=1
# gpgcheck=1
# metadata_expire=0m
and run
$ yum update $ yum 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.