Installation and Configuration Guide: For Version 3.2.10
Installation and Configuration Guide: For Version 3.2.10
Installation and Configuration Guide: For Version 3.2.10
The fonts used in this guide are licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://
scripts.sil.org/OFL
iii
Chapter 1
This guide will walk you through the installation and configuration of the SOGo solution. It also
covers the installation and configuration of SOGo ActiveSync support - the solution used to
synchronize mobile devices with SOGo.
Introduction
SOGo is a free and modern scalable groupware server. It offers shared calendars, address books, and
emails through your favourite Web browser and by using a native client such as Mozilla Thunderbird
and Lightning.
SOGo is standard-compliant. It supports CalDAV, CardDAV, GroupDAV, iMIP and iTIP and reuses
existing IMAP, SMTP and database servers - making the solution easy to deploy and interoperable
with many applications.
SOGo features:
▪ Scalable architecture suitable for deployments from dozens to many thousands of users
▪ Rich Web-based interface that shares the look and feel, the features and the data of Mozilla
Thunderbird and Lightning
▪ Improved integration with Mozilla Thunderbird and Lightning by using the SOGo Connector and
the SOGo Integrator
▪ Native compatibility for Microsoft Outlook 2003, 2007, 2010, and 2013
SOGo is developed by a community of developers located mainly in North America and Europe.
More information can be found at http://sogo.nu/
Introduction 2
Chapter 2
Introduction 3
Chapter 2
Standard protocols such as CalDAV, CardDAV, GroupDAV, HTTP, IMAP and SMTP are used to
communicate with the SOGo platform or its sub-components. Mobile devices supporting the
Microsoft ActiveSync protocol are also supported.
To install and configure the native Microsoft Outlook compatibility layer, please refer to the SOGo
Native Microsoft Outlook Configuration Guide.
Introduction 4
Chapter 3
System Requirements
Assumptions
SOGo reuses many components in an infrastructure. Thus, it requires the following:
▪ LDAP server (OpenLDAP, Novell eDirectory, Microsoft Active Directory and others)
If you plan to use ActiveSync, an IMAP server supporting the ACL, UIDPLUS, QRESYNC,
ANNOTATE (or X-GUID) IMAP extensions is required, such as Cyrus IMAP version 2.4 or later, or
Dovecot version 2.1 or later. If your current IMAP server does not support these extensions, you
can use Dovecot’s proxying capabilities.
In this guide, we assume that all those components are running on the same server (i.e., localhost
or 127.0.0.1) that SOGo will be installed on.
Good understanding of those underlying components and GNU/Linux is required to install SOGo.
If you miss some of those required components, please refer to the appropriate documentation
and proceed with the installation and configuration of these requirements before continuing with
this guide.
The following table provides recommendations for the required components, together with version
numbers:
More recent versions of the software mentioned above can also be used.
System Requirements 5
Chapter 3
Production
Microsoft Windows
Apple Mac OS X
Linux
System Requirements 6
Chapter 3
Make sure the required components are started automatically at boot time and that they are running
before proceeding with the SOGo configuration. Also make sure that you can install additional
packages from your standard distribution. For example, if you are using Red Hat Enterprise Linux
7, you have to be subscribed to the Red Hat Network before continuing with the SOGo software
installation.
Note
This document covers the installation of SOGo under RHEL 7.
For installation instructions on Debian and Ubuntu, please refer directly to the SOGo website at
http://sogo.nu/. Under the Support section, you will find links for installation steps for Debian and
Ubuntu.
Note that once the SOGo packages are installed under Debian and Ubuntu, this guide can be
followed in order to fully configure SOGo.
System Requirements 7
Chapter 4
Installation
This section will guide you through the installation of SOGo together with its dependencies. The
steps described here apply to an RPM-based installation for a Red Hat or CentOS 7 distribution.
Most of these steps should apply to all supported operating systems.
Software Downloads
Note
In order to access the production builds, you need a proper support contract from
Inverse. Continue with the configuration once you received your username and
password.
SOGo can be installed using the yum utility. To do so, first create the /etc/yum.repos.d/
inverse.repo configuration file with the following content:
[SOGo]
name=Inverse SOGo Repository
baseurl=https://<username>:<password>@packages.inverse.ca/SOGo/release/3/rhel/7/
$basearch
gpgcheck=1
Note
Any non-URL safe characters in username/password must be URL-encoded. For
example, if your password is so%go, you must set the value in your configuration
file to so%25go - where % is encoded to %25.
Inverse signs its RPM packages with its GPG key. Integrity verification happens all by itself on
package installation, all you need to do is first import the key into your rpm keychain:
Some of the softwares on which SOGo depends are available from the repository "Extra Packages
for Enterprise Linux" (EPEL). To add EPEL to your packages sources, install the following package:
Installation 8
Chapter 4
SOGo relies on the GNUstep packages provided by Inverse and must not use the packages from
EPEL. Adjust the repository definition to exclude those packages:
sed -i '/enabled=1/a \
exclude=gnustep*' /etc/yum.repos.d/epel.repo
Software Installation
Once the yum configuration file has been created, you are now ready to install SOGo and its
dependencies. To do so, proceed with the following command:
This will install SOGo and its dependencies such as GNUstep, the SOPE packages and memcached.
Once the base packages are installed, you need to install the proper database connector suitable
for your environment. You need to install sope49-gdl1-postgresql for the PostgreSQL database
system, sope49-gdl1-mysql for MySQL or sope49-gdl1-oracle for Oracle. The installation
command will thus look like this:
Once completed, SOGo will be fully installed on your server. You are now ready to configure it.
Installation 9
Chapter 5
Configuration
In this section, you’ll learn how to configure SOGo to use your existing LDAP, SMTP and database
servers. As previously mentioned, we assume that those components run on the same server on
which SOGo is being installed. If this is not the case, please adjust the configuration parameters
to reflect those changes.
In SOGo, the user’s applications settings are stored in /etc/sogo/sogo.conf. You can use your
favourite text editor to modify the file.
The sogo.conf file is a serialized property list. This simple format encapsulates four basic data types:
arrays, dictionaries (or hashes), strings and numbers. Numbers are represented as-is, except for
booleans which can take the unquoted values YES and NO. Strings are not mandatorily quoted, but
doing so will avoid you many problems. A dictionary is a sequence of key and value pairs separated
in their middle with a = sign. It starts with a { and ends with a corresponding }. Each value definition
in a dictionary ends with a semicolon. An array is a chain of values starting with ( and ending with
), where the values are separated with a ,. Also, the file generally follows a C-style indentation for
clarity but this indentation is not required, only recommended. Block comments are delimited by /
* and */ and can span multiple lines while line comments must start with //.
The configuration must be contained in a root dictionary, thus be completely wrapped within curly
brackets { [configuration] }. If SOGo refuses to start due to syntax errors in its configuration
file, plparse is helpful for finding these, as it indicates the line containing the problem.
Preferences Hierarchy
SOGo supports domain names segregation, meaning that you can separate multiple groups of users
within one installation of SOGo. A user associated to a domain is limited to access only the users
data from the same domain. Consequently, the configuration parameters of SOGo are defined on
three levels:
Configuration 10
Chapter 5
Each level inherits the preferences of the parent level. Therefore, domain preferences define the
defaults values of the user preferences, and the system preferences define the default values of
all domains preferences. Both system and domains preferences are defined in the /etc/sogo/
sogo.conf, while the users preferences are configurable by the user and stored in SOGo’s database.
To identify the level in which each parameter can be defined, we use the following abbreviations
in the tables of this document:
Remember that the hierarchy paradigm allow the default value of a parameter to be defined at a
parent level.
General Preferences
The following table describes the general parameters that can be set:
Configuration 11
Chapter 5
Defaults to /var/log/sogo/sogo.log.
S WOPidFile The file path where the parent process id will
be written.
Defaults to /var/run/sogo/sogo.pid.
S WOWatchDogRequestTimeout This parameter specifies the number of minutes
after which a busy child process will be killed
by the parent process.
Defaults to 10 (minutes).
Defaults to 384.
Configuration 12
Chapter 5
Defaults to localhost.
Defaults to 300.
S SOGoAuthenticationType Parameter used to define the way by which
users will be authenticated. For C.A.S., specify
cas. For SAML2, specify saml2. For anything
else, leave that value empty.
S SOGoTrustProxyAuthentication Parameter used to set whether HTTP
username should be trusted.
Configuration 13
Chapter 5
Configuration 14
Chapter 5
▪ Public
▪ Confidential
▪ Private
▪ Viewer
▪ DAndTViewer
▪ Modifier
▪ Responder
▪ ObjectCreator
▪ ObjectEraser
Configuration 15
Chapter 5
Example: SOGoCalendarDefaultRoles =
("ObjectCreator", "PublicViewer");
▪ ObjectViewer
▪ ObjectEditor
▪ ObjectCreator
▪ ObjectEraser
Example: SOGoContactsDefaultRoles =
("ObjectEditor");
▪ Arabic
▪ Basque
▪ BrazilianPortuguese
▪ Catalan
▪ ChineseTaiwan
▪ Croatian
▪ Czech
▪ Danish
▪ Dutch
▪ English
▪ Finnish
▪ French
▪ German
▪ Hungarian
▪ Icelandic
▪ Italian
▪ Lithuanian
▪ Macedonian
▪ NorwegianBokmal
▪ NorwegianNynorsk
Configuration 16
Chapter 5
▪ Polish
▪ Portuguese
▪ Russian
▪ Slovak
▪ Slovenian
▪ SpanishArgentina
▪ SpanishSpain
▪ Swedish
▪ TurkishTurkey
▪ Ukrainian
▪ Welsh
D SOGoNotifyOnPersonalModifications Parameter used to set whether SOGo sends or
not email receipts when someone changes his/
her own calendar. Possible values are:
Configuration 17
Chapter 5
Configuration 18
Chapter 5
Configuration 19
Chapter 5
SQL_ later in this document). Insert the following text into your configuration file to configure an
authentication and global address book using an LDAP directory server:
SOGoUserSources = (
{
type = ldap;
CNFieldName = cn;
IDFieldName = uid;
UIDFieldName = uid;
IMAPHostFieldName = mailHost;
baseDN = "ou=users,dc=acme,dc=com";
bindDN = "uid=sogo,ou=users,dc=acme,dc=com";
bindPassword = qwerty;
canAuthenticate = YES;
displayName = "Shared Addresses";
hostname = "ldap://127.0.0.1:389";
id = public;
isAddressBook = YES;
}
);
In our example, we use a LDAP server running on the same host where SOGo is being installed.
You can also, using the filter attribute, restrict the results to match various criteria. For example, you
could define, in your .GNUstepDefaults file, the following filter to return only entries belonging to
the organization Inverse with a mail address and not inactive:
Since LDAP sources can serve as user repositories for authentication as well as address books, you
can specify the following for each source to make them appear in the address book module:
For certain LDAP sources, SOGo also supports indirect binds for user authentication. Here is an
example:
Configuration 20
Chapter 5
SOGoUserSources = (
{
type = ldap;
CNFieldName = cn;
IDFieldName = cn;
UIDFieldName = sAMAccountName;
baseDN = "cn=Users,dc=acme,dc=com";
bindDN = "cn=sogo,cn=Users,dc=acme,dc=com";
bindFields = (sAMAccountName);
bindPassword = qwerty;
canAuthenticate = YES;
displayName = "Active Directory";
hostname = ldap://10.0.0.1:389;
id = directory;
isAddressBook = YES;
}
);
In this example, SOGo will use an indirect bind by first determining the user DN. That value is
found by doing a search on the fields specified in bindFields. Most of the time, there will be
only one field but it is possible to specify more in the form of an array (for example, bindFields
= (sAMAccountName, cn)). When using multiple fields, only one of the fields needs to match
the login name. In the above example, when a user logs in, the login will be checked against the
sAMAccountName entry in all the user cards, and once this card is found, the user DN of this card
will be used for checking the user’s password.
Finally, SOGo supports LDAP-based groups. Groups must be defined like any other authentication
sources (ie., canAuthenticate must be set to YES and a group must have a valid email address). In
order for SOGo to determine if a specific LDAP entry is a group, SOGo will look for one of the
following objectClass attributes:
▪ group
▪ groupOfNames
▪ groupOfUniqueNames
▪ posixGroup
You can set ACLs based on group membership and invite a group to a meeting (and the group
will be decomposed to its list of members upon save by SOGo). You can also control the visibility
of the group from the list of shared address books or during mail autocompletion by setting the
isAddressBook parameter to YES or NO. The following LDAP entry shows how a typical group is
defined:
Configuration 21
Chapter 5
dn: cn=inverse,ou=groups,dc=inverse,dc=ca
objectClass: groupOfUniqueNames
objectClass: top
objectClass: extensibleObject
uniqueMember: uid=alice,ou=users,dc=inverse,dc=ca
uniqueMember: uid=bernard,ou=users,dc=inverse,dc=ca
uniqueMember: uid=bob,ou=users,dc=inverse,dc=ca
cn: inverse
structuralObjectClass: groupOfUniqueNames
mail: inverse@inverse.ca
The corresponding SOGoUserSources entry to handle groups like this one would be:
{
type = ldap;
CNFieldName = cn;
IDFieldName = cn;
UIDFieldName = cn;
baseDN = "ou=groups,dc=inverse,dc=ca";
bindDN = "cn=sogo,ou=services,dc=inverse,dc=ca";
bindPassword = zot;
canAuthenticate = YES;
displayName = "Inverse Groups";
hostname = ldap://127.0.0.1:389;
id = inverse_groups;
isAddressBook = YES;
}
The following table describes the possible parameters related to a LDAP source:
Configuration 22
Chapter 5
Configuration 23
Chapter 5
scheme://host:port/DN?attributes?scope?
filter?extensions
URLs examples:
[options="compact"] * ldap://127.0.0.1:3389
* ldaps://127.0.0.1 *
ldap://127.0.0.1/????!StartTLS
port(deprecated) Port number of the LDAP server.
Configuration 24
Chapter 5
Configuration 25
Chapter 5
The following parameters can be defined along the other keys of each entry of the
SOGoUserSources, but can also defined at the domain and/or system levels:
Defaults to 0 (unlimited).
Configuration 26
Chapter 5
▪ givenName
▪ cn
▪ mail
▪ sn
Please refer to the documentation of the software you use in order to index those attributes.
For example, if the LDAP schema uses the fax attribute to store the fax number, one could map it
to the facsimiletelephonenumber attribute like this:
mapping = {
facsimiletelephonenumber = ("fax", "facsimiletelephonenumber");
};
Name
First givenName
Last sn
DisplayName displayName or cn or givenName + sn
Nickname mozillanickname
Internet
Email mail
Secondary email mozillasecondemail
ScreenName nsaimid
Phones
Work telephoneNumber
Home homephone
Mobile mobile
Fax facsimiletelephonenumber
Pager pager
Configuration 27
Chapter 5
Home
Address mozillahomestreet + mozillahomestreet2
City mozillahomelocalityname
State/Province mozillahomestate
Zip/Postal Code mozillahomepostalcode
Country mozillahomecountryname
Web page mozillahomeurl
Work
Title title
Department ou
Organization o
Address street + mozillaworkstreet2
City l
State/Province st
Zip/Postal code postalCode
Country c
Web page mozillaworkurl
Other
Birthday birthyear-birthmonth-birthday
Note description
Photo photo
The tricky part shows up when using SOGo as a frontend interface to an IMAP server as this imposes
constraints needed by the C.A.S. protocol to ensure secure communication between the different
services. Failing to take those precautions will prevent users from accessing their mails, while still
granting basic authentication to SOGo itself.
The first constraint is that the amount of workers that SOGo uses must be higher than 1 in order
to enable the C.A.S. service to perform some validation requests during IMAP authentication. A
single worker alone would not, by definition, be able to respond to the C.A.S. requests while treating
the user request that required the triggering of those requests. You must therefore configure the
WOWorkersCount setting appropriately.
The second constraint is that the SOGo service must be accessible and accessed via https.
Moreover, the certificate used by the SOGo server has to be recognized and trusted by the C.A.S.
service. In the case of a certificate issued by a third-party authority, there should be nothing to
Configuration 28
Chapter 5
worry about. In the case of a self-signed certificate, the certificate must be registered in the trusted
keystore of the C.A.S. application. The procedure to achieve this can be summarized as importing
the certificate in the proper "keystore" using the keytool utility and specifying the path for that
keystore to the Tomcat instance which provides the C.A.S. service. This is done by tweaking the
javax.net.ssl.trustStore setting, either in the catalina.properties file or in the command-line
parameters. On debian, the SOGo certificate can also be added to the truststore as follows:
The certificate used by the CAS server must also be trusted by SOGo. In case of a self-signed
certificate, this means exporting tomcat’s certificate using the keytool utility, converting it to PEM
format and appending it to the ca-certificates.crt file (the name and location of that file differs
between distributions). Basically:
If any of those constraints is not satisfied, the webmail interface of SOGo will display an empty email
account. Unfortunately, SOGo has no possibility to detect which one is the cause of the problem.
The only indicators are log messages that at least pinpoint the symptoms:
Such an error will show up during authentication of the user to SOGo. It happens when the
authentication service has accepted the user authentication ticket but has not returned a "Proxy
Granting Ticket".
This error indicate that an attempt was made to retrieve an authentication ticket for a third-party
service such as IMAP or sieve. Most of the time, this happens as a consequence to the problem
described above. To troubleshoot these issues, one should be tailing cas.log, pam logs and sogo
logs.
Currently, SOGo will ask for a CAS ticket using the same CAS service name for both IMAP and
Sieve. When CASifying sieve, this means that the -s parameter of `pam_cas`should be the same
for both IMAP and Sieve, otherwise the CAS server will complain:
Configuration 29
Chapter 5
Finally, when using imapproxy to speed up the imap accesses, the SOGoIMAPCASServiceName
should be set to the actual imap service name expected by pam_cas, otherwise it will fail to
authenticate incoming connection properly.
When using SimpleSAMLphp, make sure the convert OID to names by modifying your metadata/
saml20-idp-hosted.php to contain something like this:
If you want to test the IdP-initiated logout using SimpleSAMLphp, you can do so by opening the
following URL:
https://idp.example.org/simplesaml/saml2/idp/SingleLogoutService.php?
ReturnTo=sogo.nu
In order to relay authentication information to your IMAP server and if you make use of the
CrudeSAML SASL plugin, you need to make sure that NGImap4AuthMechanism is configured to use
the SAML mechanism. If you make use of the CrudeSAML PAM plugin, this value may be left empty.
Database Configuration
SOGo requires a relational database system in order to store appointments, tasks and contacts
information. It also uses the database system to store personal preferences of SOGo users. In this
guide, we assume you use PostgreSQL so commands provided the create the database are related
to this application. However, other database servers are supported, such as MySQL and Oracle.
First, make sure that your PostgreSQL server has TCP/IP connections support enabled.
Tip
SOGo stores the database hostname together with table references inside several
database tables. To prevent possible future issues when moving the database to
Configuration 30
Chapter 5
another host, it is best practice to add a local alias name to your /etc/hosts
file, and using this in /etc/sogo/sogo.conf instead of the actual name of your
server or localhost. When the database host name changes, you can now simply
change the hosts file instead of updating several table columns replacing the old
hostname. An example entry for /etc/hosts when running the database on the
same host, registering 127.0.0.1 not only for localhost, but also the db-alias
alias:
In the SOGo configuration, use the alias name instead of the real IP address or
host name, for example
SOGoProfileURL =
"postgresql://sogo:sogo@db-alias:5432/sogo/sogo_user_profile";
Create the database user and schema using the following commands:
su - postgres
createuser --no-superuser --no-createdb --no-createrole \
--encrypted --pwprompt sogo
(specify “sogo” as password)
createdb -O sogo sogo
You should then adjust the access rights to the database. To do so, modify the configuration file /
var/lib/pgsql/data/pg_hba.conf in order to add the following line at the very beginning of the
file:
Once added, restart the PostgreSQL database service. Then, modify the SOGo configuration file (/
etc/sogo/sogo.conf) to reflect your database settings:
SOGoProfileURL =
"postgresql://sogo:sogo@127.0.0.1:5432/sogo/sogo_user_profile";
OCSFolderInfoURL =
"postgresql://sogo:sogo@127.0.0.1:5432/sogo/sogo_folder_info";
OCSSessionsFolderURL =
"postgresql://sogo:sogo@127.0.0.1:5432/sogo/sogo_sessions_folder";
Configuration 31
Chapter 5
Configuration 32
Chapter 5
Note
Any non-URL safe characters in username/password must be URL-encoded. For
example, if your SOGo database password is so%go, you must set the value in your
preferences to so%25go - where % is encoded to %25.
In addition to the seven tables described above, two other tables get created in the database:
sogo_quick_appointment and sogo_quick_contact which store calendar and contact information.
If you’re using MySQL, make sure in your my.cnf file you have:
[mysqld]
...
character_set_server=utf8
character_set_client=utf8
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
Important
Switching to complete Unicode compliance on an already-deployed SOGo is out
of scope of this document, as it would typically involve delicate manual operations
on the database system.
Requirements:
Configuration 33
Chapter 5
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
innodb_file_per_table = TRUE
innodb_file_format = barracuda
innodb_large_prefix = TRUE
Caution
Changing InnoDB parameters on an already deployed database server can cause
severe data loss. Do not blindly edit MySQL parameters without reading and
understanding the implication of such changes.
MySQL4Encoding = "utf8mb4";
SOGo automatically creates missing database tables on start but slightly different table creation
parameters are needed for complete Unicode compliance; meaning that before SOGo runs for the
first time, all database tables must already exist. A MySQL script to achieve just that is provided in
the SOGo distribution under Scripts/mysql-utf8mb4.sql and you can deploy it with a command
such as:
Where HOST, USER and SOGO are your MySQL host, username and database name respectively.
Once SOGo is running, you can test correctness by creating an event such as “Lunch with �� and
fries” and seeing it properly displayed in the SOGo calendar.
Ensure the computer used for the test has emoji fonts installed.
The following table describes all the possible parameters related to a SQL source:
D SOGoUserSources Parameter used to set the SQL and/or
LDAP sources used for authentication and
global address books. Multiple sources can
Configuration 34
Chapter 5
Configuration 35
Chapter 5
Configuration 36
Chapter 5
SOGoUserSources =
(
{
type = sql;
id = directory;
viewURL = "postgresql://sogo:sogo@127.0.0.1:5432/sogo/sogo_view";
canAuthenticate = YES;
isAddressBook = YES;
userPasswordAlgorithm = md5;
}
);
▪ c_name - which can be identical to c_uid - will be used to uniquely identify entries
▪ c_password - password of the user, plain-text, md5 or sha encoded for now
Note that groups are currently not supported for SQL-based authentication sources.
Defaults to /usr/lib/sendmail.
D SOGoForceExternalLoginWithEmail Parameter used to specify if, when logging in to
the SMTP server, the primary email address of
Configuration 37
Chapter 5
▪ YES
▪ NO
Configuration 38
Chapter 5
▪ imaps://127.0.0.1:993
▪ imap://127.0.0.1:143/?tls=YES
D SOGoSieveServer Parameter used to set the DNS name or IP
address of the Sieve (managesieve) server used
by SOGo. You must use an URL such as:
▪ sieve://127.0.0.1
▪ sieve://127.0.0.1:2000
▪ sieve://127.0.0.1:2000/?tls=YES
▪ YES
▪ NO
▪ rfc2086
▪ rfc4314
▪ YES
▪ NO
▪ YES
Configuration 39
Chapter 5
▪ NO
Defaults to /var/spool/sogo.
S NGMimeBuildMimeTempDirectory Parameter used to set the path where
temporary files will be stored by SOPE when
dealing with MIME messages.
Defaults to /tmp.
S NGImap4DisableIMAP4Pooling Disables IMAP pooling when set to YES. Enable
pooling by setting to NO or using a caching
proxy like imapproxy.
Configuration 40
Chapter 5
▪ Calendar
▪ Mail
▪ Contacts
SOGoMailListViewColumnsOrder = (Flagged,
Attachment, Priority, From, Subject,
Unread, Date, Size);
D SOGoExternalAvatarsEnabled Parameter used to enable fetching of avatars
from remote services.
Configuration 41
Chapter 5
SOGoVacationHeaderTemplateFile = /etc/
sogo/autoresponder.header.txt;
▪ %{username}
▪ %{daysBetweenResponse}
D SOGoVacationFooterTemplateFile Parameter used to specify the path of a text file
whose content must be appended to the user’s
vacation message. For example:
SOGoVacationFooterTemplateFile = /etc/
sogo/autoresponder.footer.txt;
Configuration 42
Chapter 5
▪ 1
▪ 2
▪ 5
▪ 10
▪ 20
▪ 30
▪ 60
▪ manually
▪ every_minute
▪ every_2_minutes
▪ every_5_minutes
▪ every_10_minutes
▪ every_20_minutes
▪ every_30_minutes
▪ once_per_hour
▪ selected
▪ personal
▪ first
Configuration 43
Chapter 5
▪ January1
▪ First4DayWeek
▪ FirstFullWeek
Defaults to %H:%M.
U SOGoCalendarCategories Parameter used to define the categories that
can be associated to events. This parameter is
an array of arbitrary strings.
▪ PUBLIC
▪ CONFIDENTIAL
▪ PRIVATE
▪ PUBLIC
▪ CONFIDENTIAL
▪ PRIVATE
Configuration 44
Chapter 5
▪ -PT5M
▪ -PT10M
▪ -PT15M
▪ -PT30M
▪ -PT45M
▪ -PT1H
▪ -PT2H
▪ -PT5H
▪ -PT15H
▪ -P1D
▪ -P2D
▪ -P1W
D SOGoFreeBusyDefaultInterval The number of days to include in the free busy
information. The parameter is an array of two
numbers, the first being the number of days
prior to the current day and the second being
the number of days following the current day.
▪ inline
▪ attached
▪ above
Configuration 45
Chapter 5
▪ below
Defaults to below.
U SOGoMailReplyTo The email address to use in the reply-to
header field when the user sends a message.
▪ above
▪ below
Defaults to below.
U SOGoMailComposeMessageType The message composition format. Possible
values are:
▪ text
▪ html
Defaults to text.
S SOGoEnableEMailAlarms Parameter used to enable email-based alarms
on events and tasks.
Configuration 46
Chapter 5
▪ %{FolderName}
▪ %{UserName}
▪ %{Email}
Configuration 47
Chapter 5
{
SOGoProfileURL =
"postgresql://sogo:sogo@127.0.0.1:5432/sogo/sogo_user_profile";
OCSFolderInfoURL =
"postgresql://sogo:sogo@127.0.0.1:5432/sogo/sogo_folder_info";
OCSSessionsFolderURL =
"postgresql://sogo:sogo@127.0.0.1:5432/sogo/sogo_sessions_folder";
SOGoAppointmentSendEMailNotifications = YES;
SOGoCalendarDefaultRoles = (
PublicViewer,
ConfidentialDAndTViewer
);
SOGoLanguage = English;
SOGoTimeZone = America/Montreal;
SOGoMailDomain = acme.com;
SOGoIMAPServer = 127.0.0.1;
SOGoDraftsFolderName = Drafts;
SOGoSentFolderName = Sent;
SOGoTrashFolderName = Trash;
SOGoJunkFolderName = Junk;
SOGoMailingMechanism = smtp;
SOGoSMTPServer = 127.0.0.1;
SOGoUserSources = (
{
type = ldap;
CNFieldName = cn;
IDFieldName = uid;
UIDFieldName = uid;
baseDN = "ou=users,dc=acme,dc=com";
bindDN = "uid=sogo,ou=users,dc=acme,dc=com";
bindPassword = qwerty;
canAuthenticate = YES;
displayName = "Shared Addresses";
hostname = 127.0.0.1;
id = public;
isAddressBook = YES;
port = 389;
}
);
}
Multi-domains Configuration
If you want your installation to isolate two groups of users, you must define a distinct authentication
source for each domain. Your domain keys must have the same value as your email domain you
want to add. Following is the same configuration that now includes two domains (acme.com and
coyote.com):
Configuration 48
Chapter 5
{
...
domains = {
acme.com = {
SOGoMailDomain = acme.com;
SOGoDraftsFolderName = Drafts;
SOGoUserSources = (
{
type = ldap;
CNFieldName = cn;
IDFieldName = uid;
UIDFieldName = uid;
baseDN = "ou=users,dc=acme,dc=com";
bindDN = "uid=sogo,ou=users,dc=acme,dc=com";
bindPassword = qwerty;
canAuthenticate = YES;
displayName = "Shared Addresses";
hostname = 127.0.0.1;
id = public_acme;
isAddressBook = YES;
port = 389;
}
);
};
coyote.com = {
SOGoMailDomain = coyote.com;
SOGoIMAPServer = imap.coyote.com;
SOGoUserSources = (
{
type = ldap;
CNFieldName = cn;
IDFieldName = uid;
UIDFieldName = uid;
baseDN = "ou=users,dc=coyote,dc=com";
bindDN = "uid=sogo,ou=users,dc=coyote,dc=com";
bindPassword = qwerty;
canAuthenticate = YES;
displayName = "Shared Addresses";
hostname = 127.0.0.1;
id = public_coyote;
isAddressBook = YES;
port = 389;
}
);
};
};
}
The following additional parameters only affect SOGo when using multiple domains.
Configuration 49
Chapter 5
Apache Configuration
The SOGo configuration for Apache is located in /etc/httpd/conf.d/SOGo.conf.
Upon SOGo installation, a default configuration file is created which is suitable for most
configurations.
You must also configure the following parameters in the SOGo configuration file for Apache in order
to have a working installation:
You may consider enabling SSL on top of this current installation to secure access to your SOGo
installation.
Configuration 50
Chapter 5
You might also have to adjust the configuration if you have SELinux enabled.
The default configuration will use mod_proxy and mod_headers to relay requests to the sogod parent
process. This is suitable for small to medium deployments.
Starting Services
Once SOGo if fully installed and configured, start the services using the following command:
You may verify using the systemctl is-enabled sogod command that the SOGo service is
automatically started at boot time. Restart the Apache service since modules and configuration files
were added:
Finally, you should also make sure that the memcached service is started and that it is also
automatically started at boot time.
Once you’ve correctly set those two preferences, you must create a cronjob that will run under the
"sogo" user. This cronjob should be run every minute.
A commented out example should have been installed in /etc/cron.d/sogo, to enable it, simply
uncomment it.
* * * * * /usr/sbin/sogo-ealarms-notify
If your mail server requires use of SMTP AUTH, specify a credential file using -p /path/
to/credFile. This file should contain the username and password, separated by a colon
(username:password)
Configuration 51
Chapter 5
A commented out example should have been installed in /etc/cron.d/sogo. To work correctly
this tool must login as an administrative user on the sieve server. The required credentials must
be specified in a file by using -p /path/to/credFile. This file should contain the username and
password, separated by a colon (username:password).
Configuration 52
Chapter 6
dn: uid=sogo,ou=users,dc=acme,dc=com
objectClass: top
objectClass: inetOrgPerson
objectClass: person
objectClass: organizationalPerson
uid: sogo
cn: SOGo Administrator
mail: sogo@acme.com
sn: Administrator
givenName: SOGo
Load the LDIF file inside your LDAP server using the following command:
Finally, set the password (to the value qwerty) of the SOGo administrative account using the
following command:
dn: uid=jdoe,ou=users,dc=acme,dc=com
objectClass: top
objectClass: inetOrgPerson
objectClass: person
objectClass: organizationalPerson
uid: jdoe
cn: John Doe
mail: jdoe@acme.com
sn: Doe
givenName: John
Load the LDIF file inside your LDAP server using the following command:
Finally, set the password (to the value qwerty) of the SOGo administrative account using the
following command:
As an alternative to using command-line tools, you can also use LDAP editors such as Luma or
Apache Directory Studio to make your work easier. These GUI utilities can make use of templates
to create and pre-configure typical user accounts or any standardized LDAP record, along with the
correct object classes, fields and default values.
ActiveSync clients can fully synchronize contacts, emails, events and tasks with SOGo. Freebusy
and GAL lookups are also supported, as well as "Smart reply" and "Smart forward" operations.
To enable Microsoft ActiveSync support in SOGo, you must install the required packages.
Once installed, simply uncomment the following lines from your SOGo Apache configuration:
ProxyPass /Microsoft-Server-ActiveSync \
http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync \
retry=60 connectiontimeout=5 timeout=360
The following additional parameters only affect SOGo when using ActiveSync:
▪ Outlook 2013/2016 does not search the GAL. One possible alternative solution is to configure
Outlook to use a LDAP server (over SSL) with authentication. Outlook 2013/2016 also does not
seem to support multiple address books over ActiveSync.
▪ Make sure you do not use a self-signed certificate. While this will work, Outlook will work
intermittently as it will raise popups for certificate validation, sometimes in background,
preventing the user to see the warning and thus, preventing any synchronization to happen.
▪ ActiveSync clients keep connections open for a while. Each connection will grab a hold on a
sogod process so you will need a lot of processes to handle many clients. Make sure you tune
your SOGo server when having lots of ActiveSync clients.
▪ Outlook 2013/2016 freebusy lookups are supported using the Internet Free/Busy feature
of Outlook 2013/2016. Please see http://support.microsoft.com/kb/291621 for configuration
instructions. On the SOGo side, SOGoEnablePublicAccess must be set to YES and the URL to use
must be of the following format: http://<hostname>/SOGo/dav/public/%NAME%/freebusy.ifb
▪ If you have very large mail folders (thousands of messages), you will need to adjust the word
size of your IMAP server. In Dovecot, the parameter to increase is "imap_max_line_length" while
under Cyrus IMAP Server, the parameter is "maxword". We suggest a buffer of 2MB.
▪ If you are using MySQL, make sure you set "max_allowed_packet" to a large value since the EAS
cache size can be large for mailboxes with thousands of messages. A 64M or even 128M value
is recommended.
In order to use the SOGo ActiveSync support code in production environments, you need to get a
proper usage license from Microsoft. Please contact them directly to negotiate the fees associated
to your user base.
Inverse inc. provides this software for free, but is not responsible for anything related to its usage.
First of all, it is important to know that most EAS devices will keep HTTP connections open to SOGo
(and thus, Apache) for a long time. This is required for "push" to work properly. Connections can
stay open for up to one hour, or 3600 seconds.
ProxyPass /Microsoft-Server-ActiveSync \
http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync \
retry=60 connectiontimeout=5 timeout=360
The above line sets a timeout for up to 360 seconds, or 6 minutes. If you want to let EAS clients
keep their HTTP connections open for up to an hour, you must change the timeout parameter and
set it to 3600.
EAS clients will keep HTTP connections open for a long time during these two EAS commands:
Ping and Sync. By default, SOGo will prevent EAS clients from keeping connections for a long time.
This is to avoid the situation where all SOGo child processes would be monopolized by EAS clients
- rendering the SOGo web interface or DAV interface unavailable. The default SOGo behavior is
thus similar to disable EAS push entirely.
The last configuration parameter to adjust is WOWorkersCount - which sets the number of SOGo
child process that will be used to handle requests. You should have at least one child per EAS device
configured to use "push". You must also have more children than you have EAS devices configured
to use "push" - in order to handle normal SOGo requests to its Web or DAV interfaces.
Here are some usage examples for EAS devices using "push". In all cases, the Apache timeout is set
to 3600 and the WOWatchDogRequestTimeout parameter is set to 60.
Microsoft Enterprise
ActiveSync Tuning 58
Chapter 8
WOWorkersCount = 15;
SOGoMaximumPingInterval = 3540;
SOGoMaximumSyncInterval = 3540;
SOGoInternalSyncInterval = 30;
WOWorkersCount = 120;
SOGoMaximumPingInterval = 3540;
SOGoMaximumSyncInterval = 3540;
SOGoInternalSyncInterval = 60;
Microsoft Enterprise
ActiveSync Tuning 59
Chapter 9
Using SOGo
Log in using the "jdoe" user and the "qwerty" password. The underlying database tables will
automatically be created by SOGo.
With the SOGo Integrator plug in, your calendars and address books will be automatically discovered
when you login in Thunderbird. This plug in can also propagate specific extensions and default user
settings among your site. However, be aware that in order to use the SOGo Integrator plug in, you
will need to repackage it with specific modifications. Please refer to the documentation published
online:
http://sogo.nu/downloads/documentation.html
If you only use the SOGo Connector plug in, you can still easily access your data.
Using SOGo 60
Chapter 9
▪ Click on OK.
▪ Select CalDAV.
▪ Click on Continue.
To configure the application so it works with SOGo, create a new account and specify, as the
Account URL, an URL such as:
http://127.0.0.1/SOGo/dav/jdoe/
Note that the trailing slash is important for the old Apple iCal 3 application.
Apple AddressBook
Since Mac OS X 10.6 (Snow Leopard), Apple AddressBook can be configured to use SOGo.
In order to make this work, you must add a new virtual host in your Apache configuration file to
listen on port 8800 and handle requests coming from iOS devices.
Using SOGo 61
Chapter 9
<VirtualHost *:8800>
RewriteEngine Off
ProxyRequests Off
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On
ProxyPassInterpolateEnv On
ProxyPass /principals http://127.0.0.1:20000/SOGo/dav/ interpolate
ProxyPass /SOGo http://127.0.0.1:20000/SOGo interpolate
ProxyPass / http://127.0.0.1:20000/SOGo/dav/ interpolate
<Location />
Order allow,deny
Allow from all
</Location>
<Proxy http://127.0.0.1:20000>
RequestHeader set "x-webobjects-server-port" "8800"
RequestHeader set "x-webobjects-server-name" "acme.com:8800"
RequestHeader set "x-webobjects-server-url" "http://acme.com:8800"
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
RequestHeader set "x-webobjects-remote-host" "127.0.0.1"
AddDefaultCharset UTF-8
</Proxy>
ErrorLog /var/log/apache2/ab-error.log
CustomLog /var/log/apache2/ab-access.log combined
</VirtualHost>
This configuration is also required if you want to configure a CardDAV account on an Apple iOS
device (version 4.0 and later).
Using SOGo 62
Chapter 10
Upgrading
This section describes what needs to be done when upgrading to the current version of SOGo from
the previous release.
2.3.1
The SOGoCalendarDefaultCategoryColor default has been removed. If you want to
customize the color of calendar categories, use the SOGoCalendarCategories and
SOGoCalendarCategoriesColors defaults.
2.3.0
Run the shell script sql-update-2.2.17_to_2.3.0.sh or sql-update-2.2.17_to_2.3.0-
mysql.sh (if you use MySQL).
This will grow the "participant states" field of calendar quick tables to a larger size and add the
the "c_description" column to calendar quick tables.
Moreover, if you are using a multi-domain configuration, make sure the keys for your domains
match the email domains you have defined.
2.2.8
The configuration configuration parameters were renamed:
2.0.4
The parameter SOGoForceIMAPLoginWithEmail is now deprecated and is replaced by
SOGoForceExternalLoginWithEmail (which extends the functionality to SMTP authentication).
Update your configuration if you use this parameter.
Upgrading 63
Chapter 10
The sogo user is now a system user. For new installs, this means that su - sogo won’t work
anymore. Please use sudo -u sogo <cmd> instead. If used in scripts from cronjobs, requiretty
must be disabled in sudoers.
1.3.17
Run the shell script sql-update-1.3.16_to_1.3.17.sh or sql-update-1.3.16_to_1.3.17-
mysql.sh (if you use MySQL).
This will grow the "cycle info" field of calendar tables to a larger size.
1.3.12
Once you have updated and restarted SOGo, run the shell script sql-
update-1.3.11_to_1.3.12.sh or sql-update-1.3.11_to_1.3.12-mysql.sh (if you use MySQL).
This will grow the "content" field of calendar and addressbook tables to a larger size and fix the
primary key of the session table.
1.3.9
For Red Hat-based distributions, version 1.23 of GNUstep will be installed. Since the location of
the Web resources changes, the Apache configuration file (SOGo.conf) has been adapted. Verify
your Apache configuration if you have customized this file.
Upgrading 64
Chapter 11
Additional Information
For more information, please consult the online FAQs (Frequently Asked Questions) :
http://sogo.nu/support/faq.html
You can also read the mailing archives or post your questions to it. For details, see :
https://lists.inverse.ca/sogo
Additional Information 65
Chapter 12
support@inverse.ca
Inverse (http://inverse.ca) offers professional services around SOGo to help organizations deploy
the solution and migrate from their legacy systems.
Commercial Support
and Contact Information 66