How to configure Postfix email server on VPS hosting

Configure Postfix Email Server On VPS is some time very difficult for many of us, Because we are not a person, to work with server side management. But at the same time outgoing and incoming mail server is one of the necessary part of online presence for any blogger. We all know very well that, Email is and will continue to remain one of the most widely used social interaction platforms. This probably explains why Facebook, Twitter and other popular social media platforms still send emails on latest trends, friend requests or other important notifications. it is that most internet users treat emails with more importance than a notification on a website.

How to Configure Postfix Email Server On VPS Hosting Provider


In this tutorial, I will show you how you can quickly Configure Postfix Email Server for your VPS package to send out emails.


Step1: Log into your VPS server and Install postfix


Postfix is an opensource email server which is freely available and easy to install.


sudo yum install postfix



Step2: Configure postfix Email server



sudo vim /etc/postfix/

#Uncomment the following lines

myhostname =
myorigin = $myhostname
inet_interfaces = localhost
inet_protocols = ipv4
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks_style = host



Step3: Start your server



service postfix start


Test email sending from your server


echo “test” | mail -s “Test mail “ [email protected]


You can also have your server connect to your email service to send emails.


Step1. Open postfix configuration files.



vim /etc/postfix/

#uncomment/add the following lines with your details

relayhost = [] smtp_sasl_auth_enable = yes


Install the “SASL” Authentication plugin


sudo yum install cyrus-sasl-plain



Step2. Restart your server



service postfix restart


And you are done for configure postfix email server! Isn’t it really simple? If this article helped you, or if you’d like us to cover other how-to’s in the coming weeks, feel free to share your thoughts in the comments below.

Know More About Easy Email Hosting Services,

About the author

Mitul Patel

A Techno-Guide member of Kadva Corporation. For giving your thought a wing join with me. Be a Mind of man-woman.

1 Comment

  • This is an excellent article. Although i had some difficulties, i managed to install Mail Server with virtual domains on my Centos 7 server by combining this good tutorial and the one i found from

Leave a Comment