By some reason libc-client package in modern versions of ubuntu and debian don\’t work with php 5.3.x
One solution is compile a new version of libc-client lib.
#!/bin/sh -x
## for Ubuntu 9.10
## Author: Alejandro Leiva
cd $(dirname $0)
FILE_DIR=$(cd $(dirname $0) && pwd)
apt-get install -y libxml2-dev libbz2-dev libpng-dev libjpeg62-dev libc-client2007b-dev libmysqlclient15-dev libxslt1-dev apache2-mpm-prefork apache2-prefork-dev
cd /usr/src
wget ftp://ftp.cac.washington.edu/imap/imap-2007e.tar.Z
zcat imap-2007e.tar.Z | tar -xvf -
cd imap-2007e
make clean
make ldb EXTRAAUTHENTICATORS=gss PASSWDTYPE=gss
cp c-client/c-client.a c-client/libc-client.a
mkdir -p /usr/local/c-client-2007e/lib
mkdir -p /usr/local/c-client-2007e/include
cp c-client/*.h /usr/local/c-client-2007e/include
cp c-client/*.a /usr/local/c-client-2007e/lib
cd ..
wget http://es2.php.net/get/php-5.3.1.tar.bz2/from/es.php.net/mirror
tar xvjf php-5.3.1.tar.bz2
cd php-5.3.1
./configure --prefix=/usr/local/php-5.3.1 --with-bz2 --with-gd --with-zlib --with-mysql --with-xsl --with-gettext --enable-mbstring --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-pcntl --enable-ftp --with-imap=/usr/local/c-client-2007e --with-imap-ssl --with-kerberos --with-apxs2=$(which apxs2)
make
make install