Overview
SOGo is a groupware application that has the unique capability of being able to share calendars and contacts between users via the webmail interface or the Thunderbird client. To date this is the only application that I have found that comes close to providing the most commonly used features of MS Outlook and Exchange for no software cost. It can also push Thunderbird plug-ins and settings to the Thunderbird clients.
These are the steps I used (most of this is cut and paste into a putty shell) to install this software. If you have any comments or improvements please let me know.
More details can be found here: http://www.sogo.nu/downloads/documentation.html
Requirements
Minimum required ClearOS packages
- Graphical Console
- Mail
- PHP
- Web
- MySQL
External packages
- SOGo (http://sogo.nu)
- Thunderbird email client (optional)
- Thunderbird SOGo plugin (optional)
Steps
Install the server software
- Install ClearOS and configure the email, php, web and MySQL server settings and autostart.
- Create the “sogo” service user (no password required) and make a temporary working directory:
groupadd -r sogo useradd -mr -g sogo sogo mkdir rpm cd rpm
- Download and copy files from openldap-2.2.43:
wget "http://mirrors.easynews.com//linux/centos/5/os/i386/CentOS/openldap-2.3.43-12.el5_5.3.i386.rpm" rpm2cpio openldap-2.3.43-12.el5_5.3.i386.rpm | cpio -idmv cp -r ./usr/lib/* /usr/lib/ rm -rf ./usr rm -rf ./etc
- Setup the SOGo repository:
nano /etc/yum.repos.d/SOGo.repo
- Add and save (with these settings SOGo will get updated and only memcached will be seen from the EPEL repo):
[sogo] name=Inverse SOGo Repository baseurl=http://inverse.ca/downloads/SOGo/CentOS5/$basearch enabled=1 gpgcheck=0 [epel] name=EPEL Repository baseurl=http://download.fedora.redhat.com/pub/epel/5/$basearch enabled=1 gpgcheck=0 includepkgs=memcached*
- Install SOGo with the MySQL backend:
yum install sogo sope49-gdl1-mysql
- Modify the SOGo http config file <add your data here>:
nano /etc/httpd/conf.d/SOGo.conf
RequestHeader set "x-webobjects-server-port" "443" RequestHeader set "x-webobjects-server-name" "<your server external name or IP>" RequestHeader set "x-webobjects-server-url" "https://<your server external name or IP>"
- Install the SOGo user and tables in MySQL <add your data here>:
mysql --user=root --password=<mysqlpassword> mysql CREATE DATABASE `sogo`; CREATE USER 'sogo'@'localhost' IDENTIFIED BY '<mysqlpassword>'; GRANT ALL PRIVILEGES ON `sogo`.* TO 'sogo'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES; exit
- Configure SOGo <add your data here>:
service sogod stop
su sogo
defaults write sogod SOGoTimeZone "America/Phoenix"
defaults write sogod SOGoMailDomain "<youremaildomain>"
defaults write sogod SOGoLanguage English>
defaults write sogod SOGoAppointmentSendEMailNotifications YES
defaults write sogod SOGoFoldersSendEMailNotifications YES
defaults write sogod SOGoACLsSendEMailNotifications YES
defaults write sogod SOGoAppointmentSendEMailReceipts YES
defaults write sogod SOGoCalendarDefaultRoles '("PublicViewer", “ConfidentialDandTViewer”)'
defaults write sogod SOGoSuperUsernames '(<user1>,<user2>)'
defaults write sogod SOGoEnablePublicAccess YES
defaults write sogod SOGoUserSources '({filter="(objectClass = 'pcnMailAccount')"; CNFieldName=cn; IDFieldName=cn; UIDFieldName=uid; bindFields=(uid); baseDN="ou=Accounts,dc=<yourdomain>,dc=<yourdomainsuffix>"; bindDN="cn=manager,cn=internal,dc=<yourdomain>,dc=<yourdomainsuffix>"; bindPassword=<LDAP password fromGUI>; canAuthenticate=YES; displayName="Local Addresses"; hostname="localhost"; id=public; isAddressBook=YES; port=389})'
defaults write sogod SOGoProfileURL 'mysql://sogo:<mysqlpassword>@localhost:3306/sogo/sogo_user_profile'
defaults write sogod OCSFolderInfoURL 'mysql://sogo:<mysqlpassword>@localhost:3306/sogo/sogo_folder_info'
defaults write sogod SOGoMailingMechanism smtp
defaults write sogod SOGoSMTPServer localhost
defaults write sogod SOGoDraftsFolderName INBOX/Drafts
defaults write sogod SOGoSentFolderName INBOX/Sent
defaults write sogod SOGoTrashFolderName INBOX/Trash
defaults write sogod SOGoOtherUsersFolderName INBOX/user
defaults write sogod SOGoSharedFolderName INBOX/shared
defaults write sogod SOGoIMAPServer localhost
defaults write sogod SOGoMailShowSubscribedFoldersOnly NO
defaults write sogod SOGoVacationEnabled YES
defaults write sogod SOGoForwardEnabled YES
defaults write sogod SOGoSieveScriptsEnabled YES
defaults write sogod SOGoMailMessageCheck every_10_minutes
defaults write sogod SOGoMailReplyPlacement above
defaults write sogod SOGoMailSignaturePlacement above
defaults write sogod SOGoMailComposeMessageType html
defaults write sogod SOGoEnableEMailAlarms NO
defaults write sogod SOGoTimeFormat "%I:%M %p"
exit
- Configure and start services:
service memcached start chkconfig memcached on service sogod restart chkconfig sogod on service httpd restart
- Now you can log into the webmail interface:
https://<yourservername or IP>/SOGo
Syncing with Thunderbird:
Server Side
- Setup the Thunderbird update server to install the SOGo Connector, Integrator and Calendar:
- Download and modify the extensions (this example is for SOGo Connector 3.104, Integrator 3.104 and Calendar 1.0b2.104i). Adjust the version numbers as required:
mkdir -p /var/www/html/SOGo-configs/WINNT_x86-msvc/temp cd /var/www/html/SOGo-configs/WINNT_x86-msvc wget http://www.sogo.nu/files/downloads/extensions/lightning-1.0b2.104i_win32.xpi wget http://www.sogo.nu/files/downloads/extensions/sogo-connector-3.104.xpi mv lightning-1.0b2.104i_win32.xpi lightning.xpi mv sogo-connector-3.104.xpi connector.xpi cd temp wget http://www.sogo.nu/files/downloads/extensions/sogo-integrator-3.104-sogo-demo.xpi mv sogo-integrator-3.104-sogo-demo.xpi integrator.xpi unzip -oq integrator.xpi rm -f integrator.xpi
nano -w ./chrome/content/extensions.rdf
- Replace “sogo-demo.inverse.ca” with your servers external FQDN or IP:
isi:updateURL="http://sogo-demo.inverse.ca/plugins/updates.php?plugin=%ITEM_ID%&version=%ITEM_VERSION%&platform=%PLATFORM%">
<li>
<Description
em:id="sogo-integrator@inverse.ca"
em:name="SOGo Integrator"/>
</li>
<li>
<Description
em:id="sogo-connector@inverse.ca"
em:name="SOGo Connector"/>
</li>
- with:
isi:updateURL="http://<your server external FQDN or IP>/SOGo-configs/updates.php?plugin=%ITEM_ID%&version=%ITEM_VERSION%&platform=%PLATFORM%">
<li>
<Description
em:id="{e2fda1a4-762b-4020-b5ad-a41df1933103}"
em:name="Lightning"/>
</li>
<li>
<Description
em:id="sogo-integrator@inverse.ca"
em:name="SOGo Integrator"/>
</li>
<li>
<Description
em:id="sogo-connector@inverse.ca"
em:name="SOGo Connector"/>
</li>
- Rezip the file:
zip -qr integrator * mv integrator.zip /var/www/html/SOGo-configs/WINNT_x86-msvc/integrator.xpi cd /var/www/html/SOGo-configs rm -rf /var/www/html/SOGo-configs/WINNT_x86-msvc/temp
- Now create the server side update script (this example is for SOGo Connector 3.104, Integrator 3.104 and Calendar 1.0b2.104i). Adjust the version numbers as required. Also replace text <your server external FQDN or IP> with your values:
nano -w updates.php
- Add:
<?php
/* updates.php - this file is part of SOGo
*
* Copyright (C) 2006-2010 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/* This script handles the automatic propagation of extensions pertaining to a SOGo site. It requires PHP 4.1.0 or later.
*/
$plugins = array(
"sogo-connector@inverse.ca"
=> array( "application" => "thunderbird",
"version" => "3.104",
"filename" => "sogo-connector.xpi" ),
"sogo-integrator@inverse.ca"
=> array( "application" => "thunderbird",
"version" => "3.104",
"filename" => "sogo-integrator.xpi" ),
"{e2fda1a4-762b-4020-b5ad-a41df1933103}"
=> array( "application" => "thunderbird",
"version" => "1.0b2.104i",
"filename" => "lightning.xpi" ) );
$applications
= array( "thunderbird" => "<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}
/em:id>
<em:minVersion>3.1.0</em:minVersion>
<em:maxVersion>3.1.*</em:maxVersion>" );
$pluginname = $_GET["plugin"];
$plugin =& $plugins[$pluginname];
$application =& $applications[$plugin["application"]];
if ( $plugin ) {
$platform = $_GET["platform"];
if ( $platform
&& file_exists( $platform . "/" . $plugin["filename"] ) ) {
$plugin["filename"] = $platform . "/" . $plugin["filename"];
}
elseif ( !file_exists( $plugin["filename"] ) ) {
$plugin = false;
}
}
if ( $plugin ) {
header("Content-type: text/xml; charset=utf-8");
echo ('<?xml version="1.0"?>' . "\n"); ?> <!DOCTYPE RDF> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:<?php echo $pluginname ?>">
<em:updates>
<Seq>
<li>
<Description>
<em:version><?php echo $plugin["version"] ?></em:version>
<em:targetApplication>
<Description>
<?php echo $applications[$plugin["application"]] ?><em:updateLink>http://<your server external FQDN or IP>/SOGo-configs/<?php echo $plugin["filename"] ?></em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>
<?php
} else {
header("Content-type: text/plain; charset=utf-8", true, 404);
echo( 'Plugin not found' );
}
?>
Client Side
- On the client host (Windows in this case) install Thunderbird 3.X, create an account and configure it to use your COS IMAP account.
- Download and install the modified integrator.xpi add-on.
- The next time you start Thunderbird and login the Integrator will download and install the Connector and Calendar automatically.
- You can also use the “extensions.rdf” and “updates.php” scripts to install other add-ons and make configuration settings in the Thunderbird client.
Please let me know if you find any errors or omissions. If you have a better way of doing this please let me know too. I am always looking to do things better (my wife has quite an extensive list of suggestions)! I believe the “updates.php” could be automatically created with a script based on the “xpi” files in the folder.

