POP/ IMAP Setting (Dovecot)
In order to let your user to download
email to their local machine. You must install either POP or IMAP
setting at your CentOS Linux Mail Server. Dovecot is one of the
well-known the imap/pop server for CentOS Linux Mail system, it support
for maildir and mbox format.
Package to be installed at your CentOS
Linux Mail Server - dovecot.version.rpm
Install and Configure Dovecot
First, check if dovecot package already
installed
Else, you can istall Dovecot via Internet
(using "yum command")
Or, you can istall the Dovecot package
via CentOS DVD installation media
rpm -iUvh
dovecot-1.0.7-7.el5.i386.rpm
warning: dovecot-1.0.7-7.el5.i386.rpm: Header V3 DSA signature:
NOKEY, key ID e8562897
error: Failed dependencies:
libmysqlclient.so.15 is needed by dovecot-1.0.7-7.el5.i386
libmysqlclient.so.15(libmysqlclient_15) is needed by
dovecot-1.0.7-7.el5.i386 |
If you see the libmysqlclient.so.15 is
needed, you probably has not install mysql 5 yet
(mysql-5.0.45-7.el5.i386.rpm), please install mysql 5 rpm package.
rpm -iUvh
mysql-5.0.45-7.el5.i386.rpm
warning: mysql-5.0.45-7.el5.i386.rpm: Header V3 DSA signature:
NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:mysql ########################################### [100%] |
Now all the dependencies should be
installed , we are now proceed with installing Dovecot package.
rpm -iUvh
dovecot-1.0.7-7.el5.i386.rpm
warning: dovecot-1.0.7-7.el5.i386.rpm: Header V3 DSA signature:
NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:dovecot ########################################### [100%
rpm -qi dovecot
Name : dovecot Relocations: (not relocatable)
Version : 1.0.7 Vendor: CentOS
Release : 7.el5 Build Date: Wed 21 Jan 2009 03:25:29 AM EST
Install Date: Sun 06 Dec 2009 11:43:39 AM EST Build Host:
builder16.centos.org
Group : System Environment/Daemons Source RPM:
dovecot-1.0.7-7.el5.src.rpm
Size : 3730377 License: LGPL
Signature : DSA/SHA1, Sun 08 Mar 2009 09:45:25 PM EDT, Key ID
a8a447dce8562897
URL : http://www.dovecot.org/
Summary : Dovecot Secure imap server
Description :
Dovecot is an IMAP server for Linux/UNIX-like systems, written with
security
primarily in mind. It also contains a small POP3 server. It
supports mail
in either of maildir or mbox formats.
|
As you can see from the package
information above, Dovecot supports IMAP and POP by default. However,
you need to enable POP3 in Dovecot configuration file.
Configuration file location of Dovecot is
stored at /etc/dovecot.conf. What we just need to alter 2 lines of code
to get POP3 to work.
|
vim /etc/dovecot.conf
# Protocols we want to be serving:
imap imaps pop3 pop3s
# If you only want to use dovecot-auth, you can set this to "none".
protocols = imap imaps pop3
pop3s
|
Delete # in
front of protocols line to enable imap imaps pop3 and pop3 services.
Now, let
start the dovecot service
service dovecot status
dovecot is stopped
service dovecot start
Starting Dovecot Imap: [ OK ]
|
Remember to enable dovecot services
started automatically at Level3, 4 and 5
chkconfig --list dovecot
dovecot 0:off 1:off 2:off 3:off 4:off 5:off 6:off
chkconfig dovecot on
chkconfig --list dovecot
dovecot 0:off 1:off 2:on 3:on 4:on 5:on 6:off |
Test your Dovecot services
There are few
methods you can check the status Dovecot services.
1. Using
telnet to check pn port 110(POP3) and 143(IMAP)
telnet
127.0.0.1 110
Trying 127.0.0.1...
Connected to mail.1a-centosserver.com (127.0.0.1).
Escape character is '^]'.
+OK Dovecot ready.
quit
+OK Logging out
Connection closed by foreign host.
telnet
127.0.0.1 143
Trying 127.0.0.1...
Connected to mail.1a-centosserver.com (127.0.0.1).
Escape character is '^]'.
* OK Dovecot ready.
|
2.using "ps aux | grep dovecot" command will give status
of dovecot daemon
ps aux
| grep dovecot
root 10322 0.0 0.0 1868 576 ? Ss 12:17 0:00 /usr/sbin/dovecot
root 10323 0.0 0.2 7692 1864 ? S 12:17 0:00 dovecot-auth
dovecot 10325 0.0 0.2 4884 1744 ? S 12:17 0:00 pop3-login
dovecot 10326 0.0 0.2 4884 1744 ? S 12:17 0:00 pop3-login
dovecot 10328 0.0 0.2 4888 1748 ? S 12:17 0:00 imap-login
dovecot 10330 0.0 0.2 4888 1752 ? S 12:17 0:00 imap-login
dovecot 10332 0.0 0.2 4884 1740 ? S 12:17 0:00 pop3-login
dovecot 10338 0.0 0.2 4888 1752 ? S 12:19 0:00 imap-login
root 10347 0.0 0.0 3912 672 pts/3 R+ 12:23 0:00 grep dovecot
|
You are now ready! Use your favorite mail
clients agent like MS Outlook, Outlook Express, Thunderbird to connect
to our Dovecot server.
|