Php With Imap Support On Freebsd - How To

Senad

Verified User
Joined
Jan 14, 2005
Messages
79
Ok, so linux has php with imap support and today I've spent a few hours figuring it out.

Credits: As always thanks to the DirectAdmin support team for helping along the way :D.

NOTE: WE ARE BUILDING IT WITH SSL SUPPORT!

Code:
cd /home

mkdir build

cd build

wget [url]http://files.directadmin.com/services/imapback.tar.gz[/url]

tar -zxvf imapback.tar.gz

cd imap-2002e

make bsf
You will get some error messages and it won't fully build...not a problem. We will fix it by doing the following:

Code:
cd c-client

nano LDFLAGS

remove everything and add:
Code:
-lcrypt -L/usr/lib -lssl -lcrypto

Now run
Code:
make bsf

again....

code should install properly..

Now we want to:

Code:
cd c-client

make bsf EXTRACFLAGS=-I/usr/src/kerberos5/include EXTRALDFLAGS=-I/usr/src/kerberos5/lib

NOTE ON THE EXTRACT FLAGS!! MAKE SURE THAT THIS IS THE RIGHT DIRECTORY! do a locate kerberos to find the directory as it may not be kerberos5 for you!

back to the how-to :)....

Code:
mkdir /usr/local/imap-2000e/

mkdir /usr/local/imap-2000e/lib

mkdir /usr/local/imap-2000e/include

cp *.h /usr/local/imap-2000e/include

cp *.c /usr/local/imap-2000e/lib

cp c-client.a /usr/local/imap-2000e/lib

mv /usr/local/imap-2000e/lib/c-client.a /usr/local/imap-2000e/lib/libc-client.a

cd /usr/local/directadmin/customapache

nano -w configure.php  (Add --with-imap=/usr/local/imap-2000e \     to php config)

./build php n

./build php n will only update and build php if you do ./build php you can build all of the components it requires again (if there are any new ones).


Also you will need to restart apache and may need to restart imap and pop3 (as was my case).
 
Last edited:
Thank you it help me to install imap support för sugarcrm. But I had one change:

make bsf EXTRACFLAGS=-I/usr/include EXTRALDFLAGS=-I/usr/lib

I am using FreeBSD 6.0
 
Back
Top