The famous ISP-style mail server tutorial lives here. Learn how to set up your own fully-functional mail server using Postfix, Dovecot IMAP/POP3 and MySQL backend on a Debian server just like your favorite mail or website hosting provider. This guide is a voluntary project with no profit in mind. Go ahead and learn to run your own mail server within hours.
This setup consists entirely of open-source components. All you need is a cheap Debian server with root access on the internet and a domain.
Send and receive email
Receive emails for your domain(s). Use your server as a relay to send out emails. Postfix and Dovecot are the workhorse components.
Using a statistical algorithm incoming emails are scanned for spam. rspamd is the software that keeps junk outside even in high-performance environments. Use DKIM to sign your outgoing emails automatically. And mitigate brute-force login. attacks.
This guide is for you no matter if you like to run a mail server just for yourself or for a few thousand users. Get a bigger server and the components will scale.
Webmail and IMAP
Your mail users can either install a comfortable IMAP client like Thunderbird or Evolution or just use the webmail interface in their browsers so manage emails.
Don’t worry if you get stuck with your mail server. Just leave a comment and you will probably find a quick remedy.
Your emails are important. Don’t store them at a freemail provider. Remember: Nothing is for free. If you don’t pay for it then you are the product.
Combining the components described is no rocket science. But you will save a lot of time by following this guide. It is based on many years of experience and feedback.