Receiving and relaying email for my domains over to free webmail accounts.
- Be able to receive email addressed to email addresses in domains that I own on commercial, free webmail accounts (or any other kind of email system, really).
- Not pay any extra money for this (beyond what I'm paying for domain registration, DNS hosting, and my server).
- Have some domains that you're in control of, e.g.: the domain resolves to a host that you control, you have access to the DNS hosting account and are able to add/remove/modify DNS records (especially MX records).
- Have control over a host on the internet where you'll be pointing some records of your domains to. For this guide, I'm using Debian-based Ubuntu Linux Server distribution version 14.04 LTS.
create a new MX record with the following information (how you enter this into your DNS provider's interface should be easy to figure out):
host name: yourdomain.com type: MX ttl: default priority: 10 (Normal) data: yourdomain.com
sudo apt-get install postfix
- Choose "Internet site" option on menu prompt and enter settings that make sense. We'll do the rest of the configuration manually.
Put this at the end of your
## added by me virtual_alias_domains = yourfirstdomain.com, yourseconddomain.com virtual_alias_maps = hash:/etc/postfix/virtual inet_protocols = all
/etc/postfix/virtualand add lines to it like the following:
firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com
... this will cause any mail for
firstname.lastname@example.org be forwarded to
- Make sure you generate the "hash" or ".db" file for
sudo postmap hash:/etc/postfix/virtual
sudo /etc/init.d/postfix reload, or start
postfixin case it is not running already:
sudo /etc/init.d/postfix start
- Make sure that port 25 (SMTP) is open on your server's ACL/firewall!
Pretty much anything that might have gone wrong with your
will be logged to either one of these upon the package's
This comes in very handy for leveraging your ability to support multiple email addresses on the domains that you control while letting you not worry about setting up an actual client, and using existing free webmail accounts for receiving your email.
This approach covers the receiving part very well, but I've made no effort to support sending via your server/hosting, and it's unlikely to work out of the box without additional configuration. My suggestion is to not try to use your server for sending email, and to use your webmail or similar client with a "Reply-To" header if you want. I don't really care too much since I just want the receiving part to work, and later on I can reply to emails that matter to me using my real email address.