So what the Postfix it? We almost don’t know about it, so it’s just for a few people who had never heard of. It is open source software that is free and acts as a Mail Transfer Agent or MTA. MTA also has a major task that is as delivery mail from your server. Well, if there is no such MTA, so our site cannot send a messages. If only rely on MySQL database I thought it was not enough because, VPS is not able to send mail. Then, whether to the just website without email function?

So, how do you do this to learn it from the start? I think to describe more details about installing and how to setup mail server on centOS . In here, I use a Postfix for SMTP-AUTH and make sure the internet connection is available before to continue the CentOS 7 email server installation. The internet is always needed installation this. Well, we proceed it.

Before will be divided into several parts, namely:

  1. Installing Package
  2. Postfix Configuration
  3. Dovecot Configuration
  4. User Creation


We will start from the first step below:

Step 1: You must set a hostname for the server using a command below.

Here you should make a root because we indeed use an opening prefix. Screenshot_2

Step 2: Make a host entry with IP in /etc/hosts file. It will fail if you do not make it.

Step 3: And now you can start installing the packages like this.Screenshot_4


Okay, after you Installing Package now we continue on Postfix Configuration. To start configuration, we have to encrypt SSL certification as shown in below:

Step 4: Login to your CentOS home server and follow previous guidelines on the basic configuration on centOS before you build live web servers. Next, following below this:


Clear for password challenge [] value on the stage below:Screenshot_5

Step 5: Open now /etc/postfix/ for change. Now, you must find and discard comment below lines.Screenshot_7And add below line end of file. Now you must change myhostname and mydomain by value and home_mailbox to the directory you want. For example, here we can save email home user directory (eg: / home / your name / mail).Screenshot_8Step 6: In the section, we had open a file and follow setting below and check configuration using the command postfix.Screenshot_10

Step 7: Now we will configure Dovecot SASL for SMTP Auth. At file  /etc/dovecot/conf.d/10-master.conf next find “#Postfix SMTP-auth” and follow instruction belowScreenshot_11Not to be here, configure postfix is indeed more than other. But we will be a more easy step. Now you must open /etc/dovecot/conf.d/10-auth.conf file, next find “auth_mechanisms = plain”. Log in and add to the value below this:Screenshot_13 Step 9: Finished? Not, we will still restart both service postfix and dovecot then enable auto start. Screenshot_14Step 10: Add the firewall to rules allow port 25, 587, and 465. I use this port, and you can make the same thingScreenshot_15

Finally! It’s over. Now we go start testing connection

And now, we will continue to the next stage. Yes, I think we will soon finish the job.


Let’s begin configuration with following this instruction below:

Step 11: Open file /etc/dovecot/conf.d/10-mail.conf then find #mail_location = or you can look at a previous line. Then add the same directory as in this example in step 5.Screenshot_16

Step 12: For the next, you must open /etc/dovecot/conf.d/20-pop3.conf and do it like on line 50. Screenshot_17

Step 13: Let’s we restart dovecot service in the picture belowScreenshot_18

After that, let’s just follow commands add firewall rulesScreenshot_19

Up here please check the connectivity of port in above and see the results. In the last two stage we have to do, anything? Check it out!


Now let us make the user test, as a proof of the result.

Step 14: Now you must open /sbin/nologin it means that the skin is useful as a barrier only.Screenshot_20

Done! the mail server is now set. We just did a little experiment after user configuration to send or receive mail in the client mail.


And additionally the image above, into column, should we enter the contents with the last name before completion. It was a few steps tutorial How to Setup Mail Server on CentOS , whatever platform you use for the website must surely to send and receive email. With so sure website will feel more live, you also don’t need to do all the manual and difficult.

Actually, if you don’t use CentOS 7 also not anything, there are several other ways and a tutorial that is available is not but I am writing this more complete with a step more to make it more understand when you’re confused would do anything in the next if I forget one apart. To know all that is needed although a small part and will be look too much to do when is turned on and do CentOS mail server settings.

Don’t worry, I will describe a bit more other functions to do these settings, one of them all that is the site will be important and useful. We certainly don’t want that people only visit the website or just comment without more feedback, well, with mail server so we can send or receive email more and improve communication with visitors. I think it is some way to make the experience of using mail server CentOS 7

In addition, we will be notified if new visitors to sign up, it will make our website more quickly up. They might have most lazy to push “contact us” to ask a few lines go away and a long time will be back. But if we will be used server so we can fast reply, and answer all they need so it will come back more often without having to call a web way boring. But I think not all so, only a few but different.

Maybe when you figure out how to setup mail server on CentOS server , several websites that offer them. But you must know that not all the providers tutorial describes detailed or at least to make you better understand each step without eliminating one step to it. All of the following lines are all lines that you need to start to setup mail server in CentOS  without the cut of one a small parts yet.

If you still confuse, ask in the comment column and we will be happy to help resolve problems in this tutorial. We will describe what makes trouble just to leave a comment or contact you again then make sure you know everything you did before figures it out. I write the way is clear, you just need to follow or if you know more only as the reference.