How to set up a mail server in Ubuntu or Debian
I had originally written this tutorial for xmodulo.com This tutorial will discuss how to set up a working mail server in Ubuntu or Debian. As we know, the two major protocols used in a mail server are SMTP and POP/IMAP. In this tutorial, postfix will be used for SMTP, while dovecot will be used for POP/IMAP. Both are open source, stable and highly customizable. Please note that securing a mail server is beyond the scope of this tutorial, and will be covered in future tutorials. Prerequisites Each domain should have a DNS server. It is recommended NOT to use a live domain for testing purposes. In this tutorial, a test domain example.tst will be used in a lab environment. A DNS server for this hypothetical domain should have the following records at the least. Forward zone for example.tst: IN MX 10 mail.example.tst. mail.example.tst. IN A 192.168.10.1 Reverse zone for example.tst: 192.168.10.1 IN PTR mail.example.tst. While configuring a li...