Deciding if you need a personal mail server



Most of us are pissed off that the server owner reads our mail. Of course, algorithms do it, not real people, but this does not make it any easier: muddy contextual advertising, assembled from scraps of phrases, insufficient security, and just the realization that your correspondence can be viewed by a conditional comrade major - enrage. Someone is more enraged, someone less.



Some specialists also have a fad on the beauty of mail. I want a nice, short, memorable address that would show that you are not just a gmail slave, butquite an independent combat unit on the IT battlefields. And someone just wants to experiment. These people have already assembled the core of the system themselves, fine-tuned the home media server, taught the router to download everything from file sharing without the participation of the OS. Now you need to raise your mail, a private VPN, and then you can look in the direction of writing drivers or other activities of the "hardcore" level.



Many IT specialists have a request that the public mail service is unable to satisfy. But not everyone is aware of what it will cost them. So let's see if you really need a mail server or if you should put your energy in some more promising direction.



I don't want my mail to be read



If you are enraged by the total surveillance of corporations for your mailings, then raising your own server is literally the last argument in this situation, because there are several intermediate solutions between gmail and your own mailer.



The first option is to use non-corporate mail services, which were created, in fact, by your associates.



The most striking and popular example among independent mail services is ProtonMail. This service was created specifically for people with an increased degree of paranoia. No “save password” or “remember me on this device” when two-factor is on. Each time we log in with our hands, each time we enter the authorization code that comes to the phone. The service works well on the “email over Tor” system, that is, unlike other services, it is friendly with the “onion”. But due to the increased degree of that very paranoia, ProtonMail does not work very well with SMTP and has a number of other diseases inherent in underground projects. For example, the ProtonMail administration officially acknowledged problems with registration on some popular sites and services from their addresses.



In addition to ProtonMail, there are many more services - this one is simply the most famous and was given as an example. It is worth remembering that the smaller the postal service, the more distrust it has from the rest of the network.



There are also half-measures to fight for your privacy. In the same Google account, you can prohibit any analysis of data and their transfer to the company, plus you can refuse to use Google Chrome in favor of another browser. This will dampen corporate appetites, but it will not guarantee that your mail is still not being scanned-read-analyzed.



If the transition to another mail service or half-measures in the form of games with privacy settings do not suit you, then yes - you need your own mail server .



I need "pretty" mail



Getting rid of "gmail", "yandex" or any other index in an email address is a dream of many professionals, especially if you are a freelancer. At times it is awkward when exchanging e-mail at work to give your address like "yabestpazrab@gmail.com" in response to "manager@companyname.com". Many people get the feeling that they are not specialists, but impostors. Look, not even a real work mail.



And in this story, a personal mail server is also the last argument, because large mail services allow you to raise a mail domain inside yourself, if you have a real address. For example, the same Gmail will happily and for a fee transform your mailbox from gmail.com to domainname.com, and you will continue to work in the already familiar Gmail interface. And no raising your own server, administration, problems with the availability of letters and everything that a private mailer promises. Just sign up for a G Suite account, buy a domain and set up everything as it is written in the official manual .



If using corporate products and scanning the content of emails does not suit you, then yes - you need your own mail server .



To me. Needed. Own. Mail. Server.



If you have not found alternatives to your personal mail server according to the text above, then congratulations, here we will talk about the pitfalls of this wonderful event.



First of all, in order to raise our mail server, we need three components:



  1. Understanding that your mail server in 2020 is easy;
  2. The server on which everything will spin-spin;
  3. Personal domain.


Let's start with the general. All this talk about their mail server, security, anti-spam settings and so on leaves most people in a state of frustration.



The problem is that most of us got the basic knowledge about setting up our own mail server back in the late 90s and early 00s, that is, by the standards of the IT industry, even in ancient times. Yes, 20 years is almost an eternity ago!



So that you understand how long ago it was. In 2000, the first version of Symbian was released, AMD introduced the revolutionary Athlon with a frequency of 1 GHz, Windows 2000 was released, and the PlayStation 2 hit the shelves. The same year, the dot-com bubble began to burst, and Bon Jovi released the single It's My Life.



And from about that era, ideas about mail servers of those who have never really dealt with them grow up. In fact, everything is much simpler now.



The first step in setting up a mail server is finding the domain name that suits you, on which we will hang the entire economy. Where to buy domains is up to you. It is possible abroad, it is possible at reg.ru or another major local seller, it is a matter of taste.



The second step is to buy a server for your needs. Well, here we humbly recommend our VPS - an excellent solution for such a lightweight thing as a mail server. And the selected Linux distribution will be immediately ready on the machine.



The third step can be of two types. Simple and complex.



A simple option looks like buying a VPS with Ubuntu and the command in the console:



# apt install postfix


During the installation process, we indicate your personal domain as an Internet site, and in the parameter we mydestinationindicate



mydestination = $mydomain, localhost.$mydomain, localhost


We leave for reboot and that's it! You are incredible with your own mail server!



There is a more difficult option for those who prefer to control everything.



Instead of the almost standard Postfix, the development of which began back in 1998, you can choose any other server, for example Qmail, Exim, Citadel, Zimbra, or even the paid MailerQ. These guys are most often mentioned in the search.



For example, Exim - originally from the offices of the University of Cambridge, is freely distributed under the GNU license, and development has been going on since the 90s. On a pleasant note: there is all possible documentation on this server, since it was obviously not sculpted on the knee. It has a fairly wide range of ready-made configurations for Unix-systems, including for not very well-known and in some places specific distributions.



The current list of systems for which there are stock configs
AIX, BSD/OS (aka BSDI), Darwin (Mac OS X), DGUX, Dragonfly, FreeBSD, GNU/Hurd, GNU/Linux, HI-OSF (Hitachi), HI-UX, HP-UX, IRIX, MIPS RISCOS, NetBSD, OpenBSD, OpenUNIX, QNX, SCO, SCO SVR4.2 (aka UNIX-SV), Solaris (aka SunOS5), SunOS4, Tru64-Unix, Ultrix, UnixWare.


Exim is a lightweight, powerful, and boldly documented option for people willing to work on customization. The only thing that darkens the picture is the exploitation of the Exim vulnerability in the summer of 2019 in versions 4.87-4.91 (current - 4.94). Then millions of mail servers were hit, and the exploit itself was rated at 9.8 out of 10. You can read more here and here , wrote on Habré.



The same “ancient mastodon” is Qmail , the first version of which was published almost 25 years ago , in December 1995. It is simple, fast, reliable as a Swiss watch, and is one of the most popular SMTP servers on the internet.



In general, it is not surprising that the most popular solutions for Linux originate in the 90s, when the Internet and unix systems were actively developing. The usual public e-mail services did not really exist then, or they were so full of holes and dangerous that it was easier to set up your own server.



Also, an attentive administrator will take care of setting up anti-spam protection. For this request, the search engine may recommend you SpamAssassin, which has been mentioned in a number of materials on the topic over the past 5 years, including one of our articles. This project stagnated from 2015 to 2018, so whether you want to use it now is an open question. The last SpamAssassin update came out in January this year and in general, it receives patches + \ - once a year. But SpamAssassin has a ton of alternatives, the samerspamd . In general, we wrote about manual configuration of the mail server back in 2017, read it , the main points that you will have to deal with are laid out there. Of course, comments to it are even more valuable, as is usually the case on Habré.



So whether you need a mail server or not



Actually, the idea is simple: a personal mail server in 2020 is comparatively simple, if you don't go deep into configuration, and comparatively affordable.



A personal mail server requires cash injections, primarily for the domain name and, in fact, the equipment itself. And if a VPS can be bought for a relatively small fee, plus "twist" on it something else besides mail, then the cost of renting a domain per year ranges from several hundred rubles to infinity.



If you are a small business and your own CEO, engineer and sysadmin, then you should still look at ready-made solutions such as G Suite from Google or another large company providing similar services.



In 100% of cases, your mail server is a field for experimentation and getting skills in setting up and administering, and, of course, a tool to combat surveillance or your own paranoia on the same topic. That in modern realities, almost the same thing is not condemned.



You just need to decide for yourself whether your goals and desires coincide with what you will receive in the end.










All Articles