mail server not working?

  • Posted May 24, 2014

Hi all,

first of all, allow me to clarify that I am so confused about setting up mail server. other than I want it to work correctly, I really wish to understand how things work here!

my situation is: I have a website, the website send emails to users on signup. my website works locally perfectly, now am transforming it online… and here where everything gets confusing!

from my little experience and knowledge about servers, I believe I need to set up the following into my Ubuntu 14.04 server :

  • apache2
  • php
  • mysql
  • vsftp
  • ssh
  • mail server these should all be configured for the web server. all in one server (droplet)

what I did configure for mail server are:

  • postfix
  • dovecot
  • SSL
  • configured DNS (mail 50)
  • configured IPtables to allow traffic on smtp port

and It did not work, I cant send or receive emails (i get reports of un-deliverable emails)

My Inquiries:

  • What I do really need to install/configure in order to run mail server?
  • What does it mean to add “MX 50”, and A record “mail” to DNS?
  • Do I need to configure FQDN? how? what is the hostnames I should use?
  • if we say, doesn’t that mean there is hostname “mail” inside but my hostname is not called mail? do I have to create separate droplet with “mail” hostname?
  • do I need POP3?

sorry for long talk, as you can see am so confused and in desperate help :) thanks,


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

thanks for explanation. <br>if I want to embed both mail and web in one droplet, do u know which postfix, dovecot tutorial should I follow? I found more than one tutorial and don’t know which suites my situation <br> <br>thanks a lot!

It’s compatible with 14.04 — that’s actually the recommended distro to use for Ubuntu, though there will be really no difference using a different version. You’ll need to set it up on a new droplet if you’re not entirely sure what you’re doing, but after the initial set up you can go ahead and add the packages you need for your apps. Keep in mind that you’ll need at least 1GB memory, so that’s the $10 droplet. Additionally, if you’re unable to modify your configs to work in conjunction with your web apps and mail server, it may be best to use two different droplets; one for your apps and one mail server. It’ll make things a lot less confusing. <br> <br>iRedMail comes fully ready-to-go other than a couple of minor things you need to do for DNS, and the default settings are only suitable for the amount of memory it recommends, so unless you’re able to change configs to suit your needs, don’t go with the 512MB droplet. <br> <br>To answer a couple of your other questions: <br> <br>1) Your MX and A records can be added through DigitalOcean. You would do something like:, as an A record point to your mail server’s IP address (your droplet’s IP). MX would be and the priority can be anything, but people generally use 5. <br> <br>2) You can change your droplet’s host name by doing, <br> <br># sudo nano /etc/hostname <br>mail <br> <br># sudo nano /etc/hosts <br> mail localhost localhost.localdomain <br>… <br> <br>The above is detailed in the iRedMail documentation. <br> <br>You can use any host name you want to, but you’ll likely just want to use “mail.” It doesn’t matter what it is, as long as it’s added in your DNS and points to your mail server IP address.

hi, <br>Is it compatible with ubuntu 14.04? <br>Do i need to install it in the new droplet? <br> <br>thanks

Since you are really confused the easiest way I suggest is iRedMail. It will setup your mail server in no time without any cost. iRedMail supports for Ubuntu the release 12.04 and 12.10. See the link bellow on how to install. <br>