You cannot see this page without javascript.

postfix dovecot roundcube

CentOS 조회 수 582 추천 수 0 2015.05.08 08:26:00

Prerequisites

To work properly, system needs to have selinux disabled.

# vi /etc/selinux/config

postfix02

 

Install Postfix

From the console, install Postfix with yum command.

# yum install postfix

postfix03

Edit configuration file /etc/postfix/main.cf and set the parameters as follow:

# vi /etc/postfix/main.cf

postfix04

postfix05

postfix06

postfix07

postfix08

Once all the parameters have been set, set application to start during system boot and start the service.

# chkconfig postfix on
# service postfix start

postfix09

 

Testing Postfix

To check if everything works as expected, type from console the following commands to send an email:

# telnet localhost smtp

postfix10

To check if the email has been received, have a look at the /home/username/Maildir/new directory.

# cd /home/username/Maildir/new/
# ll
# cat xxxxx.xxxxx.server.domain.com

postfix11

The email was received by the system then the mail server is working properly.

 

Install Dovecot

While Postfix acts as Mail Transfer Agent (MTA) only, in order to retrieve emails using modern tools we need to enable IMAP/POP3 protocols. Dovecot is an application that acts as a secure IMAP and POP3 server.

Use the yum command to install Dovecot.

# yum install dovecot

postfix12
Edit the configuration file /etc/dovecot/dovecot.conf to enable the needed protocols.

# vi /etc/dovecot/dovecot.conf

postfix13

Then we need to specify the mail location by editing the file /etc/dovecot/conf.d/10-mail.conf.

# vi /etc/dovecot/conf.d/10-mail.conf

postfix14
Edit the file /etc/dovecot/conf.d/10-auth.conf and set the following parameters:

# vi /etc/dovecot/conf.d/10-auth.conf

postfix15

postfix16

Last file to edit /etc/dovecot/conf.d/10-master.conf.

# vi /etc/dovecot/conf.d/10-master.conf

postfix17

Set Dovecot to start at system boot and start the service.

# chkconfig dovecot on
# service dovecot start

postfix18

 

Testing Dovecot

To check if Dovecot is working, we test the program through the POP3 protocol.

# telnet localhost pop3

postfix19

 

Install Roundcube

Roundcube is a browser-based IMAP client with an application-like user interface.

To configure the application, firstly we need to install MySQL server and Apache in the system.

# yum install mysql-server mysql-devel httpd

postfix20

Enable both MySQL and Apache to start at system boot and enable services.

# chkconfig mysqld on
# service mysqld start

# chkconfig httpd on
# service httpd start

 

Install EPEL repository

To install Roundcube with yum command, we need to install the EPEL repository in the system.

# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

postfix21

Once EPEL repo has been installed, use yum to install Roundcube.

# yum install roundcubemail

postfix22

 

Configure MySQL

To define the database used by the application, we need to access MySQL configuration.

# mysql -u root -p

postfix23

Edit configuration file /etc/roundcubemail/db.inc.php to set the parameters to access the database.

# vi /etc/roundcubemail/db.inc.php

postfix24

Edit the file /etc/roundcubemail/main.inc.php to set the hostname chosen to perform the login.

# vi /etc/roundcubemail/main.inc.php

postfix25

To make the system accessible outside the server, edit the file /etc/httpd/conf.d/roundcubemail.conf and set the correct parameter.

# vi /etc/httpd/conf.d/roundcubemail.conf

postfix26

Edit the /etc/php.ini file and set the time zone.

postfix27

Because the log could report errors related to encryption, set the correct encryption parameter.

# vi /etc/php.d/mcrypt.ini

postfix28

Restart Apache.

# service httpd restart

 

Testing Roundcube

Access Roundcube typing from your browser the address:

http://IP_address/roundcubemail

Enter your credential then click Login.

postfix29

The main screen appears showing the email received when Postfix was previously tested.

postfix30

 

Install Postfix Admin

To make Postfix administration easier, the Postfix admin is a web-based tool used to manage mailboxes, virtual domains and aliases.

If not already present in the system, install the PHP component needed by the application.

# yum install php-imap

Access MySQL and create the database used by Postfix Admin.

# mysql -u root -p

postfix31

Using the wget command, download the latest release of the application.

# wget http://downloads.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-2.3.6/postfixadmin-2.3.6.tar.gz

postfix32

Extract the content and move the directory to /var/www/html folder.

# tar -vxzf postfixadmin-2.3.6.tar.gz
# mv postfixadmin-2.3.6 /var/www/html/postfixadmin

postfix33postfix36

Edit the configuration file /var/www/html/postfixadmin/config.inc.php to enable the application and set the password.

# vi /var/www/html/postfixadmin/config.inc.php

postfix34

Set the correct parameters to access the database previously created.

postfix35

Add the following line to allow the creation of the administration password.

postfix36

Restart Apache.

# service httpd restart

To execute the Postfix Admin Setup Checker, type in your browser the address:

http://IP_address/postfixadmin/setup.php

postfix37

Change the setup password.

postfix38

Create the Superadmin account by filling the fields at the bottom of the screen. Click Add Admin.

postfix39

The Superadmin account is then created.

postfix40

To access the Administration interface, type in your browser the address:

http://IP_address/postfixadmin

postfix41

The Postfix Admin main screen.

postfix42

 

Sending emails through a relay

If the corporate network has an antispam system to check inbound and outbound emails, Postfix needs to be configured in order to relay the emails to the antispam.

To allow the correct emails flow, set the relayhost field with the address of the antispam system.

# vi /etc/postfix/main.cf

postfix43

The mail server is now up and running with the basic functions to properly manage email messages.

List of Articles
번호 제목 글쓴이 날짜 조회 수sort
369 Xpress Engine xe 모든 변수값 출력해 보기 LynX 2014-07-14 93753
368 Linux systemd unit 등록 옵션 LynX 2014-07-22 20455
367 Linux Install PHP 5.5.13 modules LynX 2014-06-27 11866
366 아래아 한글 웹 한글 뷰어 소스 LynX 2014-06-11 9426
365 Internet Explorer KT 인터넷 접속제한 공유기 설정 LynX 2014-01-13 9228
364 Linux lineage1 server [6] LynX 2016-01-11 9049
363 CentOS CentOS7 Mail Server Setting file [13] LynX 2015-06-13 7906
362 Server Apache HTTP Server와 Tomcat의 연동 file LynX 2014-05-20 6112
361 Windows 7 외부 윈도우 클라이언트에서 삼바서버 접속하기 LynX 2014-03-06 6030
360 CentOS7 ▒ Doly의 CentOS7 강좌13 4. 원격접속 - 3.Telnet file [8] LynX 2014-10-23 5922
359 CentOS7 ▒ Doly의 CentOS7 강좌27 10. 디스크관리 6 XFS 쿼타 file [15] LynX 2015-06-09 5732
358 CentOS7 ▒ Doly의 CentOS7 강좌29 12. 네트워크 보안설정 12.1 firewalld (2/2) [21] LynX 2015-06-09 5282
357 CentOS APM 소스설치 정리 file [18] LynX 2015-06-17 4628
356 Network VLAN 설정 ① Access mode file [27] LynX 2015-04-29 4270
355 Programing meadco print LynX 2013-12-12 4267
354 Programing Sublime Text License Keys LynX 2016-03-24 4182
353 CentOS7 ▒ Doly의 CentOS7 강좌19 6. CentOS 네트워크 5-관련 명령어 LynX 2014-10-23 4070
352 Linux musescore LynX 2015-03-28 3779
351 Linux imap-php 설치 [7] LynX 2014-09-02 3727
350 CentOS7 ▒ Doly의 CentOS7 강좌18 6. CentOS 네트워크 4-네트워크 본딩(bonding) file [10] LynX 2014-10-23 3659

XE Login