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

Source data:
Operating system: CentOS release 6.4. Installing Centos:
Domain name: iptel.com.ua
MX record: mail. iptel. com.ua 31.131.16.241
PTR Record:
Hostname: mail. iptel. com.ua
IPv6 is switched off; in the/etc/hosts: 31.131.16.241 mail fajlike. iptel. com.ua 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
CD/var/www/html/
wget http://sourceforge.net/projects/postfixadmin/files/latest/download
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 config.inc.php
show the file
Click on the following link: http://31.131.16.241/postfixadmin/setup.php
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/config.inc.php
You should delete the file
RM/var/www/html/postfixadmin/setup.php
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
rpm-Uvh http://fedora.ip-connect.vn.ua/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
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:
freshclam-v
Clamsmtp is an SMTP filter that allows you to interact with Postfix and ClamAV install from source:
wget http://thewalter.net/stef/software/clamsmtp/clamsmtp-1.10.tar.gz
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 local.cf:
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:
wget http://sourceforge.net/projects/roundcubemail/files/roundcubemail/0.9.0/roundcubemail-0.9.0.tar.gz/download
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:
http://IP/roundcubemail-0.9.0/installer/