Configuring a mail server. Dovecot Postfix CentOS MySQL postfixadmin spamassassin clamav roundcube

Source data:
Operating system: CentOS release 6.4. Installing Centos:
Domain name:
MX record: mail. iptel.
PTR Record:
Hostname: mail. iptel.
IPv6 is switched off; in the/etc/hosts: mail fajlike. iptel. mail
Let’s get started! To start obnovimsâ:
yum update
Install main packages:
yum install dovecot dovecot postfix-mysql mysql-server
Postfix MTA
Dovecot: MDA
MySQL: DATABASE MANAGEMENT. We will store user settings in a MySQL database


Add user:
useradd-ru 1000-g mail-d/var/vmail-s/sbin/nologin-c Virtual Mailbox vmail
mkdir/var/vmail & chmod 770/var/vmail/& & & chown vmail:/var/vmail/
Installing and configuring the web interface postfixadmin to manage mailboxes and domains.
Install a web server and some packages required for postfixadmin
yum install httpd php php-imap php-mysql phpmbstring
tarxf postfixadmin-2.3.6.tar.gz & & ln-s postfixadmin2.3.6 postfixadmin
Let’s make some changes to the/var/www/html/postfixadmin/file
show the file
Click on the following link:
Create a user who will administer the mail serverlater via web-interface postfixadmin, you can create additional administrators:


set up postfixadmin
You also need to insert a password hash in/var/www/html/postfixadmin/
You should delete the file
After you login, we will get into control panel postfixadmin our mail server.


postfixadmin Admin Panel
Installing and Configuring Clamav and clamsmtp:
To check email for viruses using clamav and clamsmtp for links to postfix:
ClamAV is epel repository package; connect it and install clamav
yum install yumpriorities
Install clamav from epel repository:
yum install clamav clamd
Configuring clamd:/etc/clamd.conf:
show the file
Updated clamav anti-virus databases:
Clamsmtp is an SMTP filter that allows you to interact with Postfix and ClamAV install from source:
tarxf clamsmtp-1.10.tar.gz & & cd cd clamsmtp1.10 & & yum install gcc & &./configure make & & & & make install
/Etc/clamsmtpd.conf configuration file:
show the file
We fight spam using spamassassin:
yum install spamassassin
Add user:
spamfilter adduser-s/sbin/nologin
/Etc/mail/spamassassin/configuration file
show the file
Launch services and add them to the startup:
Service postfix start
Service dovecot start
Service clamd start
service start clamsmtp
Service spamassassin start
chkconfig postfix on & & chkconfig dovecot on chkconfig mysqld on & & & & chkconfig clamd on & & chkconfig clamsmtp on & & chkconfig spamassassin on chkconfig httpd on & &
Add the domain and multiple users through postfixadmin:
postfixadmin adding domain
postfixadmin adding domain
postfixadmin adding mail users
postfixadmin adding mail users
RoundCube Webmail is a client for e-mail, Web-based
Installing roundcube:
tarxf roundcubemail-0.9.0.tar.gz
Create a MySQL database for roundcube:
MySQL create database > roundcube;
MySQL grant all on roundcube >. * to ‘ roundcube @ ‘ localhostidentified by ‘ password ;
MySQL > flush privileges;
MySQL > quit
Add in a/etc/php.ini
date timezone = Europe/Kiev
Install phpxml
yum install phpxml
service httpd restart
Next, turn to install roundcube: