Çaylakpenguen Blog

How to set up a mail server with PostfixAdmin on CentOS 7

In this article, we will show you how to setup and configure a mail server with PostfixAdmin, Postfix, Dovecot and SQLite on a CentOS VPS. PostfixAdmin is a PHP-based web front-end that allows you to manage virtual domains and users for a Postfix mail transport agent. This guide should work on other Linux VPS systems as well but was tested and written for a CentOS 7 VPS.

If you use Ubuntu, follow our tutorial to set up Postfix, Dovecot, Spamassassin, SQLite and PostfixAdmin on an Ubuntu 16.04 VPS with Nginx and PHP 7.0

1. Update the system and install necessary packages

2. Create system user

For security reasons, we will create a new system user who will be the owner of all mailboxes.

3. Install PostfixAdmin

The latest version of PostfixAdmin, version 3, supports MySQL, PostgreSQL, and SQLite databases. In this guide, we will use SQLite.
Download the PostfixAdmin archive from SourceForge and extract it in the /var/www/html/ directory:

Open the mail configuration file and edit the following values:

Create the SQLite database:

To populate the database go to https://Your_IP_Address/postfixadmin-3.0.2/setup.php and you should see something like below:
Testing database connection - OK - sqlite://:xxxxx@//var/vmail/postfixadmin.db
Everything seems fine... attempting to create/update database structure

Create a new admin user:

4. Install and configure postfix

Postfix version 3 is not available in the default CentOS 7 repository so we will use the GhettoForge repository:

Install postfix3 with SQLite support with the command bellow:

Once the installation is completed, create the following files:

[ecko_alert color=”blue”]Stuck somewhere? Get a VPS from us and we’ll do all of this for you, free of charge! We’ll completely set up and configure a mail server for you. [/ecko_alert]

Edit the main.cf file:

Open the master.cf file, find submission inet n and smtps inet n sections and edit as follows:

Enable and restart the postfix service

5. Install and Configure Dovecot

Install dovecot using the command bellow:

Open the /etc/dovecot/conf.d/10-mail.conf file and change the following values:

Open the /etc/dovecot/conf.d/10-auth.conf file and change the following values:

Create a new dovecot-sql.conf.ext file:

In the /etc/dovecot/conf.d/10-ssl.conf file enable SSL support:

Open the /etc/dovecot/conf.d/15-lda.conf file and set the postmaster_address email address.

Open the /etc/dovecot/conf.d/10-master.conf file, find the service lmtp section and change it to:

find the service auth section and change it to:

Change the service auth-worker section to the following:

Set the permissions:

Enable and restart the dovecot service

If everything is setup correctly now you should be able to log in to your PostfixAdmin backend by going to http://Your_IP_Address/postfixadmin- and create your first virtual domain and mailbox.

Of course, you don’t have to set up a mail server with PostfixAdmin on CentOS 7, if you use one of our Mail Server Hosting services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons below or simply leave a comment in the Comments Section below. Thanks.

Kaynak Site: https://www.rosehosting.com/blog/how-to-set-up-a-mail-server-with-postfixadmin-on-centos-7/


( Toplamda 239 , bugün 1 kez ziyaret edilmiştir )


Truva Linux takımıyla 2006'da tanışan "Çaylak Penguen" -BASH- betiklerine bayılır. Truva'nıñ çekirdek derleme işleri ile çalışan cd tasarımıyla uğraşmaktadır.

Add comment

Bir Cevap Yazın

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Web Hosting Sponsorumuz

E-Posta Listelerimiz

Web Hosting Sponsorumuz

E-Posta Listelerimiz

Web Hosting Sponsorumuz

E-posta Listelerimiz

Mars on Earth Project

Dünyada ki Mars Projesi
Mars on Earth Project – Dünyadaki Mars Projesi

FreeBSDRocks Qmail

Return to Top ▲Return to Top ▲
%d blogcu bunu beğendi: