By dbulli
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
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This didn’t work for me.
A couple notes.
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.name@mydomain name@gmail.com to the file.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?
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.