Groupware Server With Group-Office, Postfix, Dovecot And SpamAssassin On Debian Lenny (5.0)


In this howto I will explain how you can set up a groupware server using:
  1. The Debian Linux operating system (
  2. Group-Office for managing the mailboxes and groupware functions like e-mail, shared calendars, file sharing etc. (
  3. Postfix with virtual accounts in MySQL . (
  4. Dovecot IMAP (
  5. SpamAssassin spam filter(
  6. A vacation perl script that will handle out-of-office replies


Set up the Debian installation

Download the Debian 5 net installer and install the base system. Just follow the Debian installation instructions and install as little software as possible. You can get Debian at

When you got Debian up and running run the following command to install all the required packages:

apt-get install php5 php5-mysql php5-imap php5-gd php5-cli php5-curl apache2 postfix postfix-mysql mysql-server mysql-client phpmyadmin subversion dovecot-imapd libemail-valid-perl libmail-sendmail-perl spamassassin spamc zip tnef libwbxml2-utils sudo openssl pyzor razor rsync mailutils libmime-charset-perl libmime-encwords-perl


Set up Group-Office

Now that all the required software is installed we can setup Group-Office. Get the Community or Professional version from: You need at least version 3.01-stable-2.

Unpack the tar archive:

# cd /var/www
# tar zxf groupoffice-com-3.01-stable-2.tar.gz
# mv groupoffice-3.01-stable-2 groupoffice

Create a directory for the Group-Office protected user files:

# mkdir /home/groupoffice
# chown www-data:www-data /home/groupoffice

Create a directory for the Group-Office public files:

# mkdir /var/www/local
# chown www-data:www-data /var/www/local

You can choose 3 different locations for the config.php file that is used by Group-Office:

  1. Inside the Group-Office source directory (/var/www/groupoffice/config.php)
  2. One level higher then the Apache document root (/var/config.php)
  3. In /etc/groupoffice/[Apache server_name]/config.php

It's best to keep the config.php file out of the source directory. This way you can upgrade easier later. We will make apache the owner temporarily so that the install script can write to it.

# touch /var/config.php
# chown www-data /var/config.php

Now launch http://your.server/groupoffice/install/ and follow the instructions on screen. Choose "Create new database" and use the root user to create a new database called "groupoffice".
When you've completed the installation you must change the ownershop of the config.php file.

# chown root /var/config.php

Edit the Group-Office config.php file and add:


Make sure the domain matches with the vacation transport of postfix you will add later.

Now Group-Office is up and running!

Share this page:

4 Comment(s)

Add comment


From: at: 2009-02-24 19:12:15

Thank you!

From: Anonymous at: 2010-12-20 20:58:06

Create the transport db:

# cd /etc/postfix
# postmap transport

The above text should include the touch statement to create an empty transport file;

Create the transport db:

# cd /etc/postfix
# touch transport
# postmap transport

From: EagleClaw at: 2009-05-03 15:11:05

I agree and disagree with aboveamenity. I think there is all the information necessary to install and configure them properly. But there is some cleanup to do.

These are some of my observations:

 - At the second page, the portion of the tutorial should be changed from the current format (postconf -e) to the file itself (like what you have on the mysql files);

 - At the second page, the tutorial says to create the transport db; well, how can the transport db be created if we don't have the transport file yet? The transport file creation appears later on the article and at that point it doesn't say to run postmap on it. For newbies this is an issue;

 - Still at the postfix configuration, the tutorial says to to include the variable transport_map twice being one different than the other;

 - Adding the mail user: the second, third and fourth lines should be /var/vmail;

 - There's no mention for installing the postfix admin module at Group-Office before trying to create any accout.

 None of these items should be a problem to any experienced linux user, but for the sake of having a clean tutorial these items should be addressed.

Thanks Falko for all your good tutorials. I use your site since I started with Linux and continue to use as a reference resource.

Best regards.

From: aboveamenity at: 2009-04-20 04:33:49

Someone needs to expand on this tutorial. There isn't enough information. It tells you to do things and doesn't tell you how...