Install Courier-Imap
What is Courier-Imap ?
The Courier IMAP server is a fast, scalable, enterprise IMAP server that uses Maildirs. Many E-mail service providers use the Courier IMAP server to easy handle hundreds of thousands of mail accounts. With its built-in IMAP and POP3 aggregation proxy, the Courier IMAP server has practically infinite horizontal scalability. In a proxy configuration, a pool of Courier servers service initial IMAP and POP3 connections from clients. They wait to receive the client's log in request, look up the server that actually holds this mail account's mailbox, and establish a proxy connection to the server, all in a single, seamless process. Mail accounts can be moved between different servers, to achieve optimum resource usage.
Install Courier-Imap
$cd /usr/ports/mail/courier-imap
$make config
Note:
Make sure you have ticked a AUTH_MYSQL before you make install
$make install clean
It will automatically install any dependency like MYSQL.. leave it untouched until installation finished.
Edit imapd, imapd-ssl, pop3d and pop3d-ssl
$cd /usr/local/etc/courier-imap
$cp pop3d.dist pop3d
$pico pop3d
## edit these line below to :
POP3AUTH="PLAIN LOGIN"
POP3AUTH_TLS="PLAIN LOGIN"
POP3DSTART=YES
## leave other options untouched
$cp imapd.dist imapd
$pico imapd
## change this line below to :
IMAPDSTART=YES
## leave other options untouched
$cp pop3d-ssl.dist pop3d-ssl
$pico pop3d-ssl
## change these line below to :
POP3DSSLSTART=YES
POP3_STARTTLS=NO
TLS_CERTFILE=/etc/ssl/smtpd.pem
## leave other options untouched
$cp imapd-ssl.dist imapd-ssl
$pico imapd-ssl
## change these line below to :
IMAPDSSLSTART=YES
IMAPDSTARTTLS=NO
TLS_CERTFILE=/etc/ssl/smtpd.pem
## leave other options untouched