Full Installation Guide - IMAP Server
From Qmail-LDAP Wiki
Installation
We will use Courier-IMAP server. Version 4 of Courier IMAP has not been tested by author, if you know the steps to install it feel free to contribute them.
Download
cd /usr/local/src wget http://200.4.48.8/pub/mail-tools/qmail/imap/courier-imap-3.0.8.tar.bz2
Courier-IMAP must not be compiled by root users, but by any other non privileged user.
cd /usr/local/src tar xvfj courier-imap-3.0.8.tar.bz2 chown -R no_root_user courier* su no_root_user export CPPFLAGS=-I/usr/local/include/ [http://www.flashpapers.com Term Papers] cd courier-imap-3.0.8 ./configure --enable-unicode=iso-8859-1,utf-8 make make check
† the export commands are only necessary in FreeBSD.
Once compiled, install it as root:
exit cd courier-imap-3.0.8 gmake install gmake install-configure
† gmake is only needed in FreeBSD, in Linux you can use either, gmake or make.
Configuration
The next step is to create the configuration files:
cp /usr/lib/courier-imap/etc/imapd.dist /etc/imapd.config
Edit /etc/imapd.config and set the next value:
MAXPERIP=20
Create an init directory:
mkdir /usr/lib/courier-imap/runscript
Create /usr/lib/courier-imap/runscript/run with the next content:
#!/bin/sh
IPADDR="0.0.0.0"
exec_prefix=/usr/lib/courier-imap
. /etc/imapd.config
exec tcpserver -c 100 -l 0 -v -R $IPADDR imap \
<a href="http://www.flashpapers.com/">Term Papers</a>
/var/qmail/bin/auth_imap \
${exec_prefix}/bin/imapd Maildir 2>&1
Make it executable and link it:
chmod +x /usr/lib/courier-imap/runscript/run ln -s /usr/lib/courier-imap/runscript /service/imapd
Check activity
svstat /service/imapd /service/imapd: up (pid 92820) 20 seconds
Test with telnet:
telnet 127.0.0.1 143 ... a1 login your_login ***** a2 select inbox
where your_login is a valid username and **** is a valid password.
This will autocreate the IMAP directories: Trash, Drafts y Sent.
