Make your personal mail server, Ubuntu edition
I am one of those persons that like to download and keep my emails on my own machines. This allows me to easily aggregate the many emails I have around, to change provider without the need to move all my emails if I have to, and to keep my emails for myself.
This is pretty easy if you’re fine with fetching the emails with your favorite mail program, but in that case you will lose a number of nice features that these days are given for granted, such as being able to access them from anywhere, and read them on your mobile device.
With a bit of work though we can have a “cloud-like” experience but the procedure is not very straightforward and I tend to forget it, so I prepared a guide that cover the various steps involved. Hopefully it will useful to someone else too. (Since I started working on it I realized it was becoming much bigger than I expected, so I am splitting it in a number of different posts for easier reading).
Note that this guide is not about installing a regular mail server serving its own domain, but a so called satellite system that will fetch and send the emails through another server (Gmail’s servers for example). Also it is meant for a system where only a few user will be present, so the choices will be made more towards keeping things simple than performance or scalability.
Also the guide will be geared towards installation on a specific linux distro (Ubuntu 16.04), and will make heavy use of default settings on that platform to keep it short. The general idea will work on other distros too, but may require more (or a different) setup.
We will see how to setup an IMAP server to store the emails, an SMTP server, how to fetch mail from remote and deliver them locally, how to send email from our system, we’ll configure antispam and full text search services, we’ll make the system available to outside clients and we’ll install a webmail for when we are on a public computer.
More in details the step involved will be the following. I will update them to links to the appropriate blog posts as soon as they are ready.
- Making your computer accessible through a domain name
- Getting SSL certificates to protect the communication when accessing from external devices
- Setup of dovecot IMAP server
- Setup of postfix for local and remote mail delivery
- Setup of fetchmail to fetch our emails from the real mail server (Gmail etc.)
- Setup of roundcube webmail.
- Antispam
- Backup