Postfix + Dovecot + MySQL + Squirrelmail on CentOS 5.5 32/64 bits

This article I will go over the installation and configuration of the e-mail server using Postfix, Postfix admin, MySQL, Squirrelmail, Dovecot, SSL on CentOS 64 bit, but it also works perfectly on 32 bit. Constructive criticism, information and questions are always welcome!

Installing needed packages and creating database in MySQL


First of all, do yum update:
# yum update -y

Then we will install the packages needed for smooth operation of the server:
# yum install gcc joe tcpdump dovecot iptraf nmap openssl* mysql mysql-server httpd squirrelmail php* -y

We will now install Postfix with MySQL support
Edit the file /etc/yum.repos.d/CentOS-Base.repo. In the fields and BASE UPDATES, add the following line:
exclude=postfix

After this, add in the field CENTOSPLUS:
includepkgs=postfix-*

Save the file and run:
# yum install postfix –y

To make sure thaty Postfix was installed with MySQL support, run the command:
# postconf -m
btree
cidr
environ
hash
ldap
mysql
nis
pcre
pgsql
proxy
regexp
static
unix

The next step is to set up the MySQL database. Let’s set a password for the root user:
# mysqladmin -u root -p password ‘newpassword’

Then, follow the steps in the MySQL shell:
mysql> CREATE DATABASE mail;
mysql> GRANT ALL PRIVILEGES ON mail.* TO ‘mail’@’localhost’ IDENTIFIED BY ‘mail';
mysql> quit

Be the First to Comment!