Does owning your own mail server sound too complicated to you or like "for someone else, but not for me"? Setting up a mail server can indeed take some time, but it is a process that many people have gone through and it offers more advantages than disadvantages.
A mail server is a program for exchanging mail. Everyone who has an email account uses mail servers, whether it’s free Google and Yahoo or other services. However, when it comes to running a business project, free services may not be the right solution for some purposes.
Large and growing projects face the need of having more control over correspondence: the more clients there are, the more important it is to ensure constant delivery of emails. Moreover, security becomes another criterion. In such cases, you should think seriously about your own mail server.
The following protocols are involved in the operation of the mail server:
Simple Mail Transfer Protocol is a simple communication protocol for sending emails. The main task of SMTP is relaying between a sender and a receiver (checking configuration, sending emails, receiving reply code). Ports 25, 587, and 465 (for SSL connection) are used for its operation. Details about SMTP server operation can be found here.
Post Office Protocol is a protocol for receiving emails. POP3 establishes a connection to a server and downloads the email to the recipient's device to display it in an email client. Ports 110 (unencrypted) and 995 (SSL/TLS) are used for its operation.
Internet Message Access Protocol is another protocol for receiving emails. The main difference from POP3 is that IMAP allows you to work with mail directly on the server, without duplicating it on the local device. Ports 143 (without encryption) and 993 ( SSL/TLS) are used for its operation.
Benefits of having personal mail server:
The disadvantages are the high responsibility for the email server performance, as well as the time, money, and effort to create it. You will need to support a security system due to hacker activity and other problems that may appear.
So, to create your own email server, you will need:
And, of course, you will need a stable and fast Internet connection.
Minimum server configuration requirements:
Virtual private servers - efficient operation at a favorable price. Fast NVMe, 22 countries, managed and unmanaged VPS.
There are several ways to build your own mail server, so we'll look at the three easiest of them.
Get a domain and your own server (for mydomain, VPS, dedicated or cloud server) with a control panel and log in with a login and password to work with the server. You need to add a mail domain through the ISPmanager server control panel and then create a mailbox.
You can add (create) a mail domain in the control panel under Domains - Mail Domains. Click Add and in the window that appears, fill in all the fields, and then click OK.
Name - the domain name.
Owner - the name of the user who owns the new mail domain.
Default action - what should be done with mails that will be sent to non-existent addresses in the created mail domain (report an error, ignore and delete, redirect to address or redirect to domain).
The next step is to create a mailbox. Go to Accounts - Mailboxes and click New. To create a mailbox on behalf of another user, go to Mail - Mailboxes and click Create. Fill in all the fields and click OK.
Name - the mailbox name, placed before the @ sign. Latin letters, numbers, dashes, underscores, and periods are allowed.
Domain - the domain to which the mailbox belongs, placed after the @ sign.
Alias - additional names for the mailbox. For example, your mailbox is admin@mydomain.com. The aliases are info, mail, and support. All mails sent to info@mydomain.com, mail@mydomain.com, and support@mydomain.com will automatically go to admin@mydomain.com. Aliases are spaced (info mail support info-center) and work within one domain.
Send copies to email - in this field, specify one or more email addresses for copies of all correspondence, if necessary.
Max.size - the maximum size of the mailbox to be created.
Note - additional information.
Use any mail client (e.g. Thunderbird, Outlook, eM Client, etc.) to conveniently work with your mailbox.
If you do not want to rent a separate server and are confident in the capabilities of your computer (more specifically, its disk space), you can create the mail server as follows.
Don't forget to buy a domain name!
Use the free hMailServer application for Windows. Download the latest version of the software and follow the installation instructions:
Now let's set up the mail server:
It is also necessary to configure protocols and ports for the mail server:
To check the functionality of the mail server, go to Utilities - Diagnostics. Select the domain you created earlier and click Start.
Now the finishing touches: select and install a client (e.g. Thunderbird, Outlook, eM Client, etc.) to receive and send email. To log in, you will need the domain login and password used for the server.
This method also requires a domain name and a server. To work with commands and access the server via SSH, owners of Linux and macOS devices can use the built-in terminal; owners of Windows - PuTTY program.
Let's start by configuring the DNS records. Log in to your domain registrar (or external DNS provider) and go to the DNS records of the domain you will use for the mail server.
It may take up to two days to update DNS records.
You can add your server IP address to the hosts file to manage the server. If port 25 on your server is blocked, contact the technical support of your hoster. Ask them to unblock this port and set the reverse DNS records of your server IP address to mail.mydomain.com (where mail is your mail address name and mydomain.com is the domain name).
Now you can start setting up the server with a few commands:
Go to mail.mydomain.com with username admin and password moohoo. In the settings, change the password to a more secure one. Also, you can set up your own mail server in the Configuration section.
After filling in all the data for the original domain name (mydomain.com), save the changes. Under "Mailboxes", you can change user settings or create aliases. Later you will be able to add more domains beyond the mydomain.com.
Web-based mail with a user-friendly interface can be accessed at http://mail.mydomain.com/SOGo/. You can also use any mail client (e.g. Thunderbird, Outlook, eM Client, etc.).