From iRedMail
Revision as of 17:50, 5 May 2012 by ZhangHuangbin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


This tutorial is designed for iRedMail OpenLDAP backend, here's another tutorial for iRedMail MySQL backend: (Debian 6)

Necessary Packages

Install iRedMail LDAP Version

Install Ubuntu 10.04 LTS i386 or amd64 (10.04 is recommended for production use) and remember don’t create user “sogo” during installation… it will be created when you install “SOGo”.
Now follow instruction on this page to install iRedMail with LDAP backend and iRedAdmin Open Source edition. (it’s very simple)

After installation is complete, reboot your system:

$ sudo reboot

Install iRedAdmin-PRO-LDAP

Buy the last version of iRedAdmin-PRO-LDAP from and follow these simple instructions to install it.

$ sudo su
# tar xjf iRedAdmin-Pro-LDAP-x.y.z.tar.bz2 -C /usr/share/apache2/
# cd /usr/share/apache2/
# rm -i /usr/share/apache2/iredadmin
# ln -s iRedAdmin-Pro-LDAP-x.y.z/ iredadmin
# cp iRedAdmin-0.1.4/settings.ini iRedAdmin-Pro-LDAP-x.y.z/
# chown -R iredadmin:iredadmin iRedAdmin-Pro-LDAP-x.y.z/
# chmod -R 0755 iRedAdmin-Pro-LDAP-x.y.z/
# chmod -R 0640 iRedAdmin-Pro-LDAP-x.y.z/settings.ini
# /etc/init.d/apache2 restart

Install SOGo with MYSQL

  • If you're using Ubuntu Lucid Lynx (10.04), add to your apt source list (/etc/apt/sources.list):
File: /etc/apt/sources.list
# SOGo
deb lucid main
  • If you're using Ubuntu Natty Narwhal (11.04), add to your apt source list (/etc/apt/sources.list):
File: /etc/apt/sources.list
# SOGo
deb natty natty
  • If you're using Ubuntu Maverick Meerkat (10.10), add to your apt source list (/etc/apt/sources.list):
File: /etc/apt/sources.list
# SOGo
deb maverick maverick
  • To install SOGo under Ubuntu Intrepid (8.10), add to your apt source list (/etc/apt/sources.list):
File: /etc/apt/sources.list
# SOGo
deb lenny lenny
  • For Jaunty (9.04) and Karmic (9.10) versions, simply use "squeeze" instead of "lenny".

  • Install SOGo, SOPE-mysql and memcached:
$ sudo su
# apt-get update
# apt-get install sogo sope4.9-gdl1-mysql memcached

  • after you must:
    • restart mysql service;
    • remove “tmpreaper” warning;
# /etc/init.d/mysql restart
# vi /etc/tmpreaper.conf
File: /etc/tmpreaper.conf
Change “SHOWWARNING=true” to “SHOWWARNING=false”

  • Create the database for user “sogo”:
# mysql -u root –p
mysql> CREATE DATABASE sogo;
mysql> GRANT ALL ON sogo.* TO sogo@localhost IDENTIFIED BY "yoursogomysqlpsw";
mysql> flush privileges;
mysql> exit

  • Enable a few modules on apache and restart it:
# a2enmod proxy
# a2enmod proxy_http
# a2enmod headers
# a2enmod rewrite
# /etc/init.d/apache2 restart

Now need to make the SOGo configuration file. For a simple use I attach my GNUstepDefaults (/home/sogo/Gnustep/Default/GNUstepDefaults).
You can copy it and must change:

  • password of user “sogo” on mysql;
  • password on “bindPassword” with your “Manager LDAP password”;
  • set your “baseDN” and “bindDN”.
# su sogo
$ vi /home/sogo/GNUstep/Defaults/.GNUstepDefaults
File: /home/sogo/Gnustep/Default/GNUstepDefaults
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//GNUstep//DTD plist 0.9//EN" "">
<plist version="0.9">
        <string>Other Users</string>
        <string>Cartella Condivisa</string>
                <string>Rubrica Condivisa</string>

  • Restart SOGo:
$ /etc/init.d/sogo restart
$ exit

GNUstepDefaults is configured and SOGo should start correctly!! if you find an error when restarting SOGo, please re-check the config file.
Now miss only apache configuration;

  • open /etc/apache2/conf.d/SOGo.conf and modify proxy settings for correct redirect when you logon to SOGo:
# vi /etc/apache2/conf.d/SOGo.conf
File: /etc/apache2/conf.d/SOGo.conf
## adjust the following to your configuration
  RequestHeader set "x-webobjects-server-port" "80"
  RequestHeader set "x-webobjects-server-name" ""
  RequestHeader set "x-webobjects-server-url" ""

## When using proxy-side autentication, you need to uncomment and
## adjust the following line:
  RequestHeader set "x-webobjects-remote-user" "%{REMOTE_USER}e"

  RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
  RequestHeader set "x-webobjects-remote-host" %{REMOTE_HOST}e env=REMOTE_HOST

  AddDefaultCharset UTF-8

  Order allow,deny
  Allow from all

  • If you want set permanent redirect to SOGo, copy and paste this line at the end of “/etc/apache2/conf.d/SOGo.conf” file:
File: /etc/apache2/conf.d/SOGo.conf
Redirect permanent /index.html

  • Restart apache and reboot system:
# /etc/init.d/apache2 restart
# reboot

  • After system restart you can start to use iRedMail + SOGo with these url: (or https://ipaddress/iredadmin) (or http://ipaddress/SOGo)

Bye bye and good work!!
Pedron Luciano

Personal tools