:: Courier IMAP on Postfix

:: What is
Please take a look at this.

:: Installing dependency
Install Postfix
Install Courier Authlib on Postfix

:: Configure Postfix to use Maildir/
[ root ]# vi /usr/local/etc/postfix/main.cf
#
# Change on this options:
#
home_mailbox = Maildir/

+ Restart Postfix service
[ root ]# /usr/local/etc/rc.d/postfix restart
postfix/postfix-script: stopping the Postfix mail system
postfix/postfix-script: starting the Postfix mail system

+ Make Maildir on user home directory
[ root ]# su - free
$ pwd
/usr/home/free
$ maildirmake Maildir
$ ls Maildir
cur new tmp
$ exit

:: Installing Courier IMAP on FreeBSD over Port
[ root ]# cd /usr/ports/mail/courier-imap/
[ root ]# make install clean
[ root ]# rehash

:: Configure Courier IMAP on Postfix
+ imapd-ssl
[ root ]# vi /usr/local/etc/courier-imap/imapd-ssl
#
# Change on this options:
#
TLS_CERTFILE=/usr/local/etc/postfix/ssl/smtpd.pem

+ pop3d-ssl
[ root ]# vi /usr/local/etc/courier-imap/pop3d-ssl
#
# Change on this options:
#
TLS_CERTFILE=/usr/local/etc/postfix/ssl/smtpd.pem

:: Set Courier IMAP to automatically start on boot up
[ root ]# vi /etc/rc.conf
#
# Add this line
#
# IMAP
courier_imap_imapd_enable="YES"
courier_imap_imapd_ssl_enable="YES"

###
# POP3
courier_imap_pop3d_enable="YES"
courier_imap_pop3d_ssl_enable="YES"

:: Starting Courier IMAP and POP3 Service
[ root ]# /usr/local/etc/rc.d/courier-imap-imapd start
Starting courier_imap_imapd.
[ root ]# /usr/local/etc/rc.d/courier-imap-imapd-ssl start
Starting courier_imap_imapd_ssl.
[ root ]# /usr/local/etc/rc.d/courier-imap-pop3d start
Starting courier_imap_pop3d.
[ root ]# /usr/local/etc/rc.d/courier-imap-pop3d-ssl start
Starting courier_imap_pop3d_ssl.

:: Testink
+ imap
[ root ]# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2008 Double Precision, Inc. See COPYING for distribution information.
aa login free freepass
aa OK LOGIN Ok.
ab select inbox
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1255697795] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
ab OK [READ-WRITE] Ok
ac logout
* BYE Courier-IMAP server shutting down
ac OK LOGOUT completed
Connection closed by foreign host.

+ imap with ssl
[ root ]# openssl s_client -connect localhost:993
..
..
..
---
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE AUTH=PLAIN ACL ACL2=UNION] Courier-IMAP ready. Copyright 1998-2008 Double Precision, Inc. See COPYING for distribution information.
aa login free freepass
aa OK LOGIN Ok.
ab logout
* BYE Courier-IMAP server shutting down
ab OK LOGOUT completed
closed

+ pop3
[ root ]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Hello there.
user free
+OK Password required.
pass freepass
+OK logged in.
quit
+OK Bye-bye.
Connection closed by foreign host.

+ pop3d with ssl
[ root ]# openssl s_client -connect localhost:995
..
..
..
Verify return code: 18 (self signed certificate)
---
+OK Hello there.
user free
+OK Password required.
pass freepass
+OK logged in.
quit
+OK Bye-bye.
closed

:: Links
+ GoogleBSD
+ CourierIMAP

0 komentar:

Post a Comment

:: Cheap Web Hosting :: ~ only from Rp. 900/mo; 250Mb/mo of Bandwidth ~ :: Web Hosting Murah Meriah :: ~ mulai dari Rp. 900/bln; Bandwidth 250Mb/bln ~