Do I need to install a mail server?

April 10, 2013 24.1k views
Magento, WordPress and many other platforms often need to send emails to users. Password resets, new users etc. Do I need to install a mail server for this to work? If so what would you recommend?
1 comment
14 Answers
Hi thanks for the response. Yeah I am not looking to manage my own mail server a this point (unless this is the only solution to my problem below). I currently use Google Apps too for my mailboxes / users which is excellent!

My issue is with the ability for web apps / platforms to send emails. My experience is with shared hosting where this just works and I am a bit stumped at what the solution is on a VPS. Your example plugin could be a solution but I have never needed it before which makes me think that there is something I need to configure on the VPS.

Thanks again.
For WordPress, I think a send only MTA such as Exim or Nullmailer are good. I use nullmailer and it has worked well for 3 years now.
by Pablo Carranza
Due to the popularity of Gmail, Google Apps,, Yahoo! Mail & a myriad of other providers, many cloud-server users mistakenly fail to install a mail server, initially. However, humans are not the only ones that send electronic mail. If fact, many Linux server applications also need to send email. This tutorial will review how to install a send-only mail server on Ubuntu 12.04.
You don't _need_ to. Most software will let you send mail from an SMTP account.

For e.g, I have Google Apps [free], which gives me a GMail inbox with the e-mail address

I'm not too familliar with wordpress, but maybe start here:

Personally I'd stay away from setting up your own mail server, it's fairly difficult to do correctly. (There's a lot of security concerns to worry about, you have to make sure you don't get blacklisted, etc. etc.)

Good luck!
Ah I have found a solution if anyone else is having this problem. Postfix is needed. For example on Ubuntu...
by Etel Sverdlov
Postfix is a free, open source Mail Transfer Agent which works to route and deliver email. Here we'll help you install and setup Postfix on an Ubuntu 12.04 VPS.
Hi there Ben,

I'm interested in the very same thing. Can you confirm it's working after following the steps in the mentioned article?

what is your linux distro?

if debian or ubuntu u can use ssmtp after configuration your apps will send mail with sendmail function.
Hi Brooqs,

I'm on Ubuntu 12.04. I'd be happy if you could elaborate a bit more on the subject. Noob here... :)
@brooqs, @goran,

please note that ssmtp is not being developed anymore and is replaced by msmtp afaik.

anyway, ssmtp works great and I'm using it on almost all machines that need to send the emails out off the box only.

so, @goran, Im using this:

# noComments /etc/ssmtp/ssmtp.conf

# noComments /etc/ssmtp/revaliases
@d ssmtp not need actively development its not have daemon also

just follow commands

apt-get update
apt-get install ssmtp

edit => nano /etc/ssmtp/ssmtp.conf

if you will use gmail or gmail domain look your gmail settings page smtp configuration then

Sample conf below

# Config file for sSMTP sendmail
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named

# Where will the mail seem to come from?

# The full hostname


# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address

this conf file not encrypte password then be sure your file permission is set to 640

save file after test simple command to write some code to test file

echo '' > /var/www/test.php

after check your inbox.

Sorry for bad english :)

if any problem feel free i will help you
sorry this comment not accept some characters simple send mail code


I installed the WP-Mail-SMTP plugin ( and notifications for news users (for instance) are working now.

Thanks for the response on I used to setup this smtp and posfix on my server for hours. Now with mandrillapp and wpmandrill plugin I am super happy and secure. Setupp litteraly took 2min and even a non programmer could do it easily. And even better, it is much less probable that you will end up in spam than using your own serer.
I will use mandrillapp on all my upcoming wp projects.

Have another answer? Share your knowledge.