Google Plus

Installing Dovecot and Squirrelmail in CentOS & SientificLinux

Written by Mel Kham on . Posted in CentOS

Note: This tutorial is a continuation of the Sendmail tutorial; please read through the Sendmail tutorial first before you attempt to install Dovecot or Squirrelmail.

Although most versions of CentOS come standard with a POP3/IMAP server, dovecot can be much easier to configure and works almost straight after installation. Both the POP3 and IMAP protocols are primarily used for receiving emails on a mail server, almost all mail servers these days support both protocols; however there is a slight difference between the two. The main different between these protocols is that the POP3 protocol retrieves the whole email for the client, once

the emails are retrieved they removed from the server; where as a IMAP stores only the header information on the client side and changes to the email can be kept track of. There are some advantages and disadvantages of each protocol; however I will leave it up to your discretion which you would prefer to use.

First things first, you will need to start out by installing both Dovecot and Squirrelmail using yum.

yum –y install dovecot squirrelmail

Next you will need to set the dovecot service to start on reboot and turn the service on

chkconfig dovecot on
service dovecot start

 You will also need to edit the dovecot configuration file to setup mail boxes for each user. The configuration file is located at /etc/dovecot.conf

 mail_location = maildir:~/Maildir
mail_location = mbox:~/mail:INBOX=/var/mail/%u

Restart dovecot so that the changes will take effect.

 You will also need Apache and PHP installed in order to run Squirrelmail. To check if Apache is installed enter the following command:

 rpm –qa httpd
rpm –qa php

 CentOS generally comes installed with Apache and PHP however, if they are not installed for some reason you can use the following command to install them.

 yum –y install httpd php

 Next you will need to create a symbolic link of the Squirrelmail folder to the Apache root directory.

 ln –s /usr/share/squirremail /var/www/html/mail

 Then you will need to browse to the config directory to run the configuration script.

 cd /usr/share/squirrelmail/config
./conf.pl

 

You will now need to go through the settings menu and choose the appropriate configuration for your server; you should not need to change much except for your domain name in server settings.

 Finally you will need to modify your Apache configuration file to set an alias and allow for SymLinks so that Apache can read the files in the /mail directory. You can do this by adding the following lines to /etc/httpd/conf/httpd.conf

 

Alias /mail/ "/usr/share/squirrelmail/"
 <Directory "/usr/share/squirrelmail">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

 

You will also need to restart Apache for these settings to take effect

 service httpd restart

 

You should be able to visit your Squirrelmail installation now by visiting your http://yourip/mail or http://example.com/mail and login using your username and password.

 

 If you are connecting via a mail client such as outlook or thunderbird you can connect using IMAP or POP3 using your IP address, however it’s probably a good idea to create DNS records for both protocols. For my mail server I created two A records pop.example.com and imap.example.com, make sure that both records point to your server.

{module user9-footer}

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

Pat L

|

I tried it and it works with a regular zip file, but if you password-protect the .zip file it does NOT work.

SK

|

Yes we can. What kind of help you need? We are doing outsourcing and technical support for Linux and Open source worldwide. To know more about the details visit here.

ClintB

|

After install as above, run shell script /opt/Citrix/ICAClient/wfica.sh manually and note lib errors still occur. I had the x64 motif loaded but had to manually install the x86 too. Got that from http://rpmfind.net/linux/rpm2html/search.php?query=libXm.so.4 Even after that, I still had to do a “yum install alsa-lib.i686 alsa-lib.x86_64″ to resolve any additional libasound.so.2 errors. Once those two lib issues were resolved, Citix Web Interface launched apps fine by telling browser to open launch.ica using /opt/Citrix/ICAClient/wfica.sh. Good luck Ernesto!

AD

|

I need some Help on Linux,can you guide me ?

Edson Carlos

|

In debian no found. I need link download install in linux debian

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .