Email in Ubuntu 12.04?

  • Posted March 1, 2014

Hi! I’m trying to install a mail server on my Ubuntu 12.04 droplet, but I honestly don’t know how to do it. Which packages do I need? I’ve been experimenting a bit with postfix, I’m able to send mail to a gmail-address, but not to an email-address hosted at something about invalid HELO).

Sorry for being such an amateur, haha. 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.

I assume you just want outgoing mail delivery for a web app. Incoming mail servers are a pain in the butt to run and the spam filtering is a full time job, so don’t do it - host your email with gmail for business, or some other service that does all that junk for you. <br> <br>OK, back to outgoing email and the HELO error: <br> <br>I just went through this. “apt-get install postfix” takes you a large part of the way but mail servers will snigger behind your back until you take some steps… <br> <br>1. Edit /etc/postfix/ and change “myhostname” to a fully qualified domain name that is actually valid for the server. I suggest this be “”, NOT just “”, because we don’t want to do anything that might confuse postfix into thinking it is the destination for incoming mail for the domain. <br> <br>2. Change “mydestination” and REMOVE your domain name if it is listed. Otherwise postfix will refuse to reach out to other mailservers to deliver mail to addresses on your own company’s domain. It’ll try to deliver it to local accounts you don’t have on the server. <br> <br>3. Edit “/etc/mailname” and set it to your company’s domain name. This ensures that email sent “from” utilities on your server, like cron, has a valid “from” address. <br> <br>(Of course all this assumes that you have actually registered a domain name and that it actually points to your server, except for incoming mail which, again, you should point at gmail for business or another well-run incoming mail service.) <br> <br>That should cover it! <br> <br>

I don’t recommend hosting a mailserver unless you’re really familiar with how it works (which is why I use Google Apps for handling my email). Is there anything preventing you from using hosted email services such as google apps and outlook?