dbulli
By:
dbulli

How do I set up email on my droplet Ubuntu Ghost 0.5.4 on 14.04?

November 21, 2014 1.8k views

I would like to install email server, and just have it forward to a @gmail.com email. I know how to set up Google App but that is no longer free, so just want the forwarding aspect.

Thanks

1 comment
2 Answers

Hi!

To set up email forwarding, you will need to install a mail transfer agent (MTA) first such as Postfix. Check out How To Install and Setup Postfix on Ubuntu 14.04 | DigitalOcean.

Once you've done that, add an alias so that all emails are forwarded to your gmail email address:

Open /etc/postfix/virtual in your favorite editor:

sudo nano /etc/postfix/virtual

Add the following line at the bottom:

# Forward everything under @domain.com
@domain.com you@gmail.com

# Forward specific email addresses
dbulli@domain.com you@gmail.com
somethingelse@domain.com you@gmail.com

Then, apply the changes:

sudo newaliases
sudo service postfix restart
by Justin Ellingwood
Postfix is one of the most popular open source mail delivery agents (MTA) in the world. In this guide, we will demonstrate how to install and configure a simple Postfix setup on an Ubuntu 14.04 server.
  • Thanks kamaln7, works like a charm. Now I have to figure out how to not make google think everything is spam.

This didn't work for me.

A couple notes.

  1. Ghost is able to send me test e-mails through ghost@mydomain.com.
  2. I'm using the ghost droplet.
  3. In the postfix main.cf file I updated the myhostname = mydomain.com, it was previously myhostname = ghost. I also removed the line alias_maps = hash:/etc/aliases and added the line virtual_alias_maps = hash:/etc/postfix/virtual.
  4. I created the file virtual under /etc/postfix and added name@mydomain name@gmail.com to the file.
  5. I ran the sudo newaliases and sudo service postfix restart command. I also tried running sudo postmap /etc/postfix/virtual and running sudo service postfix reload as well.

I'm not sure whats wrong here. Can anyone give me an idea what I'm doing wrong?

Have another answer? Share your knowledge.