msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

30 Jan 2008 Installing Zimbra on Debian 4.0 (Etch)

This post describes most of the steps I did to make a clean install of the open source edition of Zimbra on a little Debian test server including importing e-mail from a Dovecot IMAP-server.

Downloaded the Debian 4 installer from the Open Source Edition Downloads page.
Unpacked it and started the installer as root

tar xfz zcs-5.0.0_GA_1869.DEBIAN4.0.20071218200820.tgz
cd zcs-5.0.0_GA_1869.DEBIAN4.0.20071218200820
./install.sh

The Zimbra installer checked my system to see if there was an existing installation.
Then it checked for prerequisites and reported the following packages was missing

NPTL...FOUND
sudo...FOUND
libidn1l...FOUND
fetchmail...MISSING
libgmp3c2...MISSING
libxml2...FOUND
libstdc++6...FOUND
openssl...FOUND
libltdl3...MISSING

The installation was cancelled and I had to install the needed packages to continue

apt-get install fetchmail libgmp3c2 libltdl3

Started the install again and now all prerequisites was found.
The installer showed med the following installable packages

zimbra-core
zimbra-ldap
zimbra-logger
zimbra-mta
zimbra-smtp
zimbra-store
zimbra-apache
zimbra-spell
zimbra-proxy

I chose to install all but the zimbra-proxy package.
The installer crashed because the curl package was missing on my system. Installed it

apt-get install curl

and restarted the installer. The installer finished the without further problems.

Importing e-mail messages from my old IMAP server running Dovecot
To import from my old IMAp server I downloaded the imapsync script from http://www.linux-france.org/prj/imapsync/ unpacked it and typed in

./imapsync --syncinternaldates --ssl1 --user1 myOldUser --password1 mySecretPassword --host1 fromMailServer --authmech1 PLAIN --ssl2 --user2 myNedUser@example.com --password2 MyNewSecretpassword --host2 toMailServer.com   --authmech2 LOGIN

I had to install the following packages to run the imapsync script

apt-get install libmail-imapclient-perl
apt-get install libdate-manip-perl

This enabled import of my mail using SSL connection from port 993 on my old mail server to my Zimbra mail server.

I had some problems importing bil mail so I had to increase the mailsize limit from 10MB to 50MB to import all messages. Doing this as user zimbra

zmprov mcf zimbraFileUploadMaxSize 50000000

The Zimbra Administration console is only available from the server itself, that’s why I couldn’t see port 7071 from the Internet. The console is available from https://example.com:7071/zimbraAdmin

Basic usage
These commands can be run as the zimbra user
Stop zimbra

su - zimbra
zmcontrol stop

Start zimbra

zmcontrol start

Running zimbra apache on another port than port 80.
As zimbra user

zmprov ms  zimbraMailPort 8080

This makes it possible to run my own Apache server for my virtual domains.

Running another mysql server
I’ve changed the socket configuration for mysql to have another instance of it running.
Command to login to the mysql console

mysql -p -S /var/run/mysqld/mysqld2.sock

Tags: , , , ,

Posted by

27 Jan 2008 mysql create utf8 database

This is the way to create a mysql database with UTF8 characterset

CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;

Tags: , ,

Posted by

24 Jan 2008 Share calendar between Zimbra users

This post describes how to create shared calendars between two users in Zimbra 5.0

In this example, the administrator designates a mount point to userA@example.com for the calendar to  userB@example.com account for which he will have read/write permissions.

As user zimbra do the following

zmmailbox
mbox> adminAuthenticate -u https://server.example.com:7071 admin@example.com password
mbox> selectMailbox userB@example.com
mailbox: userB@example.com, size: 1.44 GB, messages: 20868, unread: 2564

getAllFolders        Id  View      Unread   Msg Count  Path
----------  ----  ----------  ----------  ----------
         1  conv           0           0  /
        10  appo           0           0  /Calendar
        14  mess           0           0  /Chats
         7  cont           0           0  /Contacts
       720  mess           0           0  /Deleted Messages
         6  mess           0           0  /Drafts
         2  mess          11        1010  /Inbox
       901  conv           0           0  /Journal
         4  mess           0           0  /Junk
       900  conv           0           0  /Outbox
         5  mess           0           0  /Sent
        15  task           0           0  /Tasks
         3  conv           0           0  /Trash
mbox userB@example.com>getFolderGrant /Calendar

Permissions    Type  Display
-----------  ------  -------
      false        rwidx  accoun  null
mbox userB@example.com>modifyFolderGrant /Calendar account userA@example.com rw
mbox userB@example.com>gfg /Calendar
Inherit  Permissions    Type  Display
-------  -----------  ------  -------
  false        rwidx  accoun  null
  false           rw  accoun  userA@example.com
mbox userB@example.com>selectMailbox userA@example.com
mailbox: userA@example.com, size: 1.12 GB, messages: 5400, unread: 860
mbox userB@example.com>createMountpoint --view appointment /userB-calendar userB@example.com /Calendar

userA@example.com should now see the calendar to userB@example.com as userB-calendar in the Calendar view.

Tags: , , , , , , , ,

Posted by

22 Jan 2008 Use local DNS name and IP from DHCP

For Red Hat Linux if you receive your IP address from a DHCP server, you may update the local DNS name by adding the following line to the correct ifcfg file in /etc/sysconfig/network-scripts, such as ifcfg-eth0 or ifcfg-eth1:

DHCP_HOSTNAME="myhostname.example.com"

If you are running Debian, edit /etc/network/interfaces as follows (adding the hostname line)

iface eth0 inet dhcp
    hostname mybox.mydomain.com

This is useful when your IP-address resolves to more than one hostname.

Tags: ,

Posted by

20 Jan 2008 Exporting and importing Zimbra LDAP data

The reasons can vary from an emergency restore of user accounts, to changing system architecture. In this Administrator’s PowerTip we will discuss how to export(dump) LDAP data to disk, and re import it.

Dumping LDAP Data to Disk
Exporting the data will place all of your LDAP Data into a single, movable .LDIF file.

su - zimbra
openldap/sbin/slapcat -f /opt/zimbra/conf/slapd.conf -l /tmp/ldap.ldif

Removing Current LDAP Data
WARNING!
DO NOT perform this on a production system. This procedure will wipe all usernames and passwords!

In order to import the LDAP data that we have exported, you will need to remove the current ldap data on the system.

su - zimbra
zmcontrol stop
ps auxx | grep slapd
(If ldap is still running, kill it)
rm -f openldap-data/*

Importing LDAP Data

su - zimbra
openldap/slapadd -f /opt/zimbra/conf/slapd.conf -l /tmp/ldap.ldif

Verify It’s Working

openldap/slapcat -f /opt/zimbra/conf/slapd.conf

or

zmprov gaa

These instructions have been testet successfully on my Zimbra 5.0 installation.

Source: http://www.zimbra.com/blog/

Tags: , , , ,

Posted by