Enter your Email Address to get subscribed to our Blog.

How to configure an email server for a VPS Hosting package

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.

In this tutorial, I will show you how you can quickly configure an 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.

<pre>

sudo yum install postfix

</pre>

Step2: Configure your postfix email server

<pre>

sudo vim /etc/postfix/main.cf

#Uncomment the following lines

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

</pre>

Step3: Start your server

<pre>

service postfix start

</pre>

Test email sending from your server

<pre>

echo “test” | mail -s “Test mail “ youremailid@yourserver.com

</pre>

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

Step1 Open postfix configuration files.

<pre>

vim /etc/postfix/main.cf

#uncomment/add the following lines with your details

relayhost = [smtp.youremailserver.com] smtp_sasl_auth_enable = yes
smtp_sasl_password_maps=static:your_username:your_password
smtp_sasl_security_options=noanonymous

</pre>

Install the “SASL” Authentication plugin

<pre>

sudo yum install cyrus-sasl-plain

</pre>

Step2 Restart your server

<pre>

service postfix restart

</pre>

And you are done! 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.

 


There is no ads to display, Please add some