Sogo

From SME Server
Jump to navigationJump to search

SOGo - Scaleable OpenGroupware.org

http://www.sogo.nu

SOGo is a groupware server built around OpenGroupware.org (OGo) and the SOPE application server. It focuses on scalability.

SOGo provides a rich AJAX-based Web interface and supports multiple native clients through the use of standard protocols such as CalDAV, CardDAV and GroupDAV.

Once configured, SOGo offers multiple ways to access the calendaring and messaging data. Your users can either use a web browser, Mozilla Thunderbird, Apple iCal, or a mobile device to access the same information.

There is a separate Howto for installing the Funambol middleware that allows SyncML mobile device synchronisation with SOGo.

Requirements

SOGo requires SME 8 (Final release available since May 2012)

Install

Adding the repository to your SME Server 8:

db yum_repositories set sogo repository \
     BaseURL http://inverse.ca/downloads/SOGo/RHEL5/i386 \
     EnableGroups yes \
     GPGCheck no \
     Name "Inverse SOGo Repository" \
     Visible yes \
     status disabled

db yum_repositories set nethsme repository \
     BaseURL http://smeserver.nethesis.it/releases/8/i386 \
     EnableGroups yes \
     GPGCheck yes \
     Name "Nethesis SME Repository" \
     Visible yes \
     status disabled

signal-event yum-modify

Installing the GPG key to verify the packages:

wget http://smeserver.nethesis.it/releases/RPM-GPG-KEY-nethesis
rpm --import RPM-GPG-KEY-nethesis

Then you can install smeserver-sogo package

yum install smeserver-sogo --enablerepo=nethsme --enablerepo=sogo

Login doesn't operate

according the bug bugzilla:7269 you can not login in sogo even if the user and password are correct. You have to modify the line which concerns the SOGo user in the file /etc/passwd

/etc/passwd not working:
...
smolt:x:454:454:Smolt:/usr/share/smolt:/sbin/nologin
spamd:x:1005:1005:spamassassin daemon user:/var/spool/spamd:/bin/false
memcached:x:455:455:Memcached daemon:/var/run/memcached:/sbin/nologin
sogo:x:456:456:SOGo daemon:/var/lib/sogo:/sbin/nologin
....

After this customer's modification:

nano /etc/passwd
sogo:x:456:456:SOGo daemon:/home/sogo:/bin/bash

You will be able to access SOGo

Timeout issue

Once you have installed SOGo you may find that there is a timeout issue in that SOGo keeps logging you out. To stop this, you will need to add the following line to the .GNUstepDefaults file:

OCSSessionsFolderURL = "mysql://sogo:{$sogod{'DbPassword'}}@localhost/sogo/sogo_sessions_folder";

To do this you need to edit the following file in your favourite editor (the code below uses vi):

mkdir -p /etc/e-smith/templates-custom/home/sogo/GNUstep/Defaults/.GNUstepDefaults
cp /etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults/10defaults  /etc/e-smith/templates-custom/home/sogo/GNUstep/Defaults/.GNUstepDefaults/10defaults 
vi /etc/e-smith/templates-custom/home/sogo/GNUstep/Defaults/.GNUstepDefaults/10defaults 

I would put it under the SOGoProfileURL = "mysql://sogo:{$sogod{'DbPassword'}}@localhost/sogo/sogo_user_profile"; line.

Or you can use this command:

sed -i '/SOGoProfileURL/ a\        OCSSessionsFolderURL = "mysql://sogo:{$sogod{'DbPassword'}}@localhost/sogo/sogo_sessions_folder"; ' /etc/e-smith/templates-custom/home/sogo/GNUstep/Defaults/.GNUstepDefaults/10defaults

Once saved, then execute the following commands:

signal-event sogo-modify;
/etc/rc7.d/S85sogod restart

Hopefully now you will no longer experience the time-out issue.

Enabling customization of "mail from" field

To do this you need to edit the following file in your favourite editor (copy the original from /etc/e-smith/templates/home/sogo/GNUstep/Defaults/.GNUstepDefaults):

/etc/e-smith/templates-custom/home/sogo/GNUstep/Defaults/.GNUstepDefaults/10defaults 

Put the following instruction under the block beginning with sogod = \{ :

SOGoMailCustomFromEnabled = YES;

Or you can use this command:

sed -i '/sogod =/ a\        SOGoMailCustomFromEnabled = YES; ' /etc/e-smith/templates-custom/home/sogo/GNUstep/Defaults/.GNUstepDefaults/10defaults

Once saved, then execute the following commands:

signal-event sogo-modify;
/etc/rc7.d/S85sogod restart

Charset issue

You may experience some problem in SOGo web interface with international fonts (à, é, ù .....) not correctly displayed. To correct this issue yuo need to edit the following file in your favourite editor (copy the original from /etc/e-smith/templates/etc/httpd/conf/httpd.conf):

/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/85SOGoAccess

and add the instruction AddDefaultCharset UTF-8 in this section:

<Location /SOGo>
       order deny,allow
       deny from all
       allow from all
       SSLRequireSSL on
       RequestHeader set "x-webobjects-server-url" "https://{$SystemName}.{$DomainName}/SOGo"
       AddDefaultCharset UTF-8
</Location>

or you can use this command:

sed -i '/x-webobjects/ a\        AddDefaultCharset UTF-8' /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/85SOGoAccess

Then expand template and restart httpd:

expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd-e-smith restart

Upgrade

Upgrade to a later SOGo version (here: upgrade to 1.3 which was released on 21.7.2010)

yum update --disablerepo=* --enablerepo=sogo
/etc/rc7.d/S85sogod restart

Usage

To access webmail and calenders, open the url http://yourdomain.net/SOGo

If you disable webmail access from within SmeServer email panel, opening http://yourdomain.net/webmail you'll be redirected to SOGo.

Thunderbird Configuration

You are encouraged to use Thunderbird ESR (Extended Support Release) and corresponding compatible Lightning plugin. According to Mozilla Team "Thunderbird Extended Support Release (ESR) is intended for groups who deploy and maintain the desktop environment in large organizations such as universities and other schools, county or city governments and businesses". Furthermore the latest releases of Lightning plugin is fully SOGo compatibile, so no more need of a SOGo customized version.

1.) From a Windows client create the folder "SOGo-plugins\WINNT_x86-msvc" in your Primary ibay "html" folder (e.g. \\<SME server name>\Primary\hmtl\SOGo-plugins\WINNT_x86-msvc)

2.) Download the latest Lightning, Connector and Integrator plugins from [1] and place them in the "WINNT_x86-msvc" folder.

3.) Rename "sogo-integrator-<version>-sogo-demo.xpi" to "sogo-integrator-<version>-sogo.xpi". (This is optional)

4.) Open the "sogo-integrator-<version>-sogo.xpi" file with your favorite zip program (it is just a renamed zip file. 7-zip works nicely for this) and edit the file "\chrome\content\sogo-integrator\extensions.rdf".

Change the following lines:

       <Seq about="http://inverse.ca/sogo-integrator/extensions"
          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>
        </Seq>

To read: (change the server address to your server and add the Lightning plugin to the extensions list): (Then save the "extensions.rdf" back to the same place in the "sogo-integrator-<version>-sogo.xpi" file and then save the .xpi file back on the server in the "\\<SME server name>\Primary\hmtl\SOGo-plugins\WINNT_x86-msvc" folder.)

       <Seq about="http://inverse.ca/sogo-integrator/extensions"
          isi:updateURL="https://<sme server name.domain>/SOGo-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>
          <li>
	      <Description
		em:id="{e2fda1a4-762b-4020-b5ad-a41df1933103}"
		em:name="Lightning"/>
          </li>
        </Seq>

5.) Create the file "updates.php" in the "SOGo-plugins" folder

6.) Add the following lines to the file: (Please note you must customize the "version =>", "filename =>" and "<em:updateLink>http://<sme server name.domain>/SOGo-plugins/<?php echo $plugin["filename"] ?></em:updateLink>" in the lines below!)

    <?php
     /* updates.php - this file is part of SOGo
      *
      *  Copyright (C) 2006-2009 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" => "0.99",
                        "filename" => "sogo-connector-0.99.xpi" ),
              "sogo-integrator@inverse.ca"
              => array( "application" => "thunderbird",
                        "version" => "0.99",
                        "filename" => "sogo-integrator-0.99-sogo.xpi" ),
              "{e2fda1a4-762b-4020-b5ad-a41df1933103}"
              => array( "application" => "thunderbird",
                        "version" => "0.9.9",
                        "filename" => "lightning-0.9.9-inverse.win32.xpi" ));
     
     $applications
     = array( "thunderbird" => "<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
                     <em:minVersion>1.5</em:minVersion>
                     <em:maxVersion>2.0.*</em:maxVersion>",
              "firefox" => "<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
                        <em:minVersion>1.5</em:minVersion>
                        <em:maxVersion>2.0.*</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>https://<sme server name.domain>/SOGo-plugins/<?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' );
     }
     ?>

(You will have to update this file everytime you update the plugins.)

7.) Install the Thunderbird ESR and configure it to use the SME IMAP email.

8.) Install the "sogo-integrator-<version>-sogo.xpi" plugin you modified, into Thunderbird and restart Thunderbird. Sogo will then go to the server and install the other plugins as configured in your "updates.php" file. As default the SOGo-Thunderbird components will associate Calendar and Addressbook to the Sme user/account corresponding to default Thunderbird Imap mail account; so take care to set the desired Imap account as default in Thunderbird before installing plugins.


Now you can create and share address books and calendars in Thunderbird with other SME users and control access rights to them. Your calendars and address books will also sync with the SOGO webmail page as well as any other computers where you have the SOGO Integrator plugin installed.

To configure other devices refer to website; look however at SOGo official up-to-date front-end software and documentation with latest upgrades for server, client and device configuration (http://www.sogo.nu/downloads/frontends.html - http://www.sogo.nu/downloads/documentation.html).

The memcached - libevent nightmare

Many users have experienced the following dependencies errors (or some kind of them) while trying to install/update SOGo or simply trying to update SME with yum update:

memcached-1.4.2-1.el5.i386 from sogo has depsolving problems
 --> Missing Dependency: libevent-1.1a.so.1 is needed by package memcached-1.4.2-1.el5.i386 (sogo)
Error: Missing Dependency: libevent-1.1a.so.1 is needed by package memcached-1.4.2-1.el5.i386 (sogo)

To solve this issue you need to install memcached form Epel; the repository can be activated according to wiki http://wiki.contribs.org/Epel . Once configured the repository you can install memcached (The current release available is memcached-1.4.5-1.el5.i386.rpm - may 2012):

yum --enablerepo=epel install memcached

Now you will be able to install/update SOGo and run yum update fine too.

Installing SOGo on SME8 64 bit

Add the repository to your SME Server 8 modifying the SOGo repo to point to 64 x86_64:

db yum_repositories set sogo repository \
     BaseURL http://inverse.ca/downloads/SOGo/RHEL5/x86_64/ \
     EnableGroups yes \
     GPGCheck no \
     Name "Inverse SOGo Repository" \
     Visible yes \
     status disabled

db yum_repositories set nethsme repository \
     BaseURL http://smeserver.nethesis.it/releases/8/i386 \
     EnableGroups yes \
     GPGCheck yes \
     Name "Nethesis SME Repository" \
     Visible yes \
     status disabled

signal-event yum-modify

Installing the GPG key to verify the packages:

wget http://smeserver.nethesis.it/releases/RPM-GPG-KEY-nethesis
rpm --import RPM-GPG-KEY-nethesis

Then you can install smeserver-sogo package (apply memcached form epel before install):

yum install smeserver-sogo --enablerepo=nethsme --enablerepo=sogo
signal-event post-upgrade; signal-event reboot

Now you must change some path in /etc/httpd.conf. Proceed as follows: create this folder in /etc/templates-custom:

mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/

and copy the SOGo templat efragment in customized template folder:

cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/85SOGoAccess /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/85SOGoAccess

then edit with your favourite editor the template to be customized and change /usr/lib/... paths in /usr/lib64/... so that the following lines in your template fragment appears modified as follows:

...............                        
Alias /.woa/WebServerResources/ /usr/lib64/GNUstep/SOGo/WebServerResources/
Alias /SOGo.woa/WebServerResources/ /usr/lib64/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ /usr/lib64/GNUstep/SOGo/WebServerResources/
AliasMatch /SOGo/so/ControlPanel/Products/(.*)/Resources/(.*) /usr/lib64/GNUstep/SOGo/$1.SOGo/Resources$2
...............                          
<Directory "/usr/lib64/GNUstep/SOGo/WebServerResources/">
...............

or you can enter the following command:

grep -rl 'usr/lib' /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/85SOGoAccess  | xargs sed -i 's/lib/lib64/g'

and to resolve the character issue mentioned halfway on this page:

sed -i '/x-webobjects/ a\        AddDefaultCharset UTF-8' /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/85SOGoAccess

Expand template and restart you SOGo

expand-template /etc/httpd/conf/httpd.conf
sv t httpd-e-smith
service sogod start

Reference

http://smeserver.nethesis.it/sogo/

http://www.sogo.nu/english/support/documentation.html