Like all my contemporaries, I was raised on Yahoo! Gmail email and webmail services. Without being offensive, I have to say that I find the Roundcube and SquirrelMail interfaces quite functional but rather unappealing. Therefore, since Google stopped hosting free emails for other domains, I was forced to lead a difficult life. I miss all of those great tools like sophisticated spam control and aesthetics. Then there’s the cost factor: we have about 10 employees in our organization who use email and paying Google $ 50 a month for email goes against my frugal nature and I don’t really care. time to play with Postfix and Exim either; I tend to avoid Sendmail like the plague it is.
I recently came across a method to use free Gmail accounts and Postfix mail forwarding so that you can use Gmail to freely host your own mail. It allows you to use Google Webmail for email using your own domain like yourdomain.co.zw and look professional without putting a hole in your pocket.
What you will need.
- Free Gmail accounts for every user you have on your domain.
- Your own domain such as yourdomain.co.zw. You can use Name.co.zw to register a .co.zw domain for $ 10 / year domain with ZISPA now.
- A VPS or a dedicated server under Linux. I would recommend using Ubuntu (I’m assuming you’re using Ubuntu in this guide.) It doesn’t matter whether the device is measured or not, because you’re not going to eat a terabyte / month using email; and if you do. that means you are using the wrong solution anyway. Even a low-end device will do.
- Learn the basic commands, this will include downloading Putty to your Windows device and using it to connect to your server.
How to implement the configuration
- After purchasing your VPS, make sure your domain MX record points to the VPS. You can confirm this by logging into your server and using the dig command, for example: dig yourdomain.co.zw and read the output. You should see the IP address mentioned somewhere in the output.
- Install Postfix (do not use the tasksel to install a mail server setup we just need Postfix here, not Dovecot and the like) using the command: sudo apt-get install suffix Choose the appropriate setting. The “website” configuration will do the trick very well.
- By default Postfix will listen on port 25, if you are one of those paranoid people who think everyone is here to get them, then follow this Ubuntu guide to setting up secure ports.
- Modify the /etc/postfix/main.cf file using your favorite editor (use nano if you are a beginner) and add the following lines to the end of the file:
virtual_alias_domains = yourdomain.co.zw
virtual_alias_maps = hash: / etc / postfix / virtual
5. Modify / Create the file / etc / postfix / virtual add the email addresses you want mail forwarded to and their corresponding Gmail accounts.
# Forward mail from @ youdomain.co.zw to [email protected]
The first address is the one Postfix receives mail for and the second is the Gmail address it sends mail to. Note that there is a space between the two addresses. It is also possible to forward emails to multiple domains, for example
Although you should know that the folks at Hotmail love to read other people’s emails.
6. You may also need to get all emails from your domain and have them forwarded to a specific email address.
#retrieve all mail destined for @ yourdomain.co.zw
7. When you are done, close the file and run the command:postmap / etc / postfix / virtual
8. Reload the Postfix configuration using the command: reloading the sudo service suffix
9. Test to see if the configuration works by sending an email to your @ yourdomain.co.zw address using another email address. The email should appear in the correct Gmail inbox.
NB This is a simple configuration and does not cover all the available options; it is intended for Joe User and Sons Ltd and not for Big Company Ltd. I’m just a humble accountant, so admins feel free to add any other relevant advice in the comments section.
Of course, you need to change names like yourdomain.co.zw and [email protected] to real domains and addresses that your domain uses.
Image Credit: Google
Concept credit: BinaryTide