How to install a mail server
About Postfix and Sendmail mail server
This tutorial has been made to show you how to install a mail server on your linux server. Sendmail mail server (MTA) is one of the most used mail server on the internet, by default this should be included in almost any linux distribution and can be used directly with any php applications by default, it integrates seamlessly with any application. From the early stages of development, sendmail has been victim of a series of vulnerabilities that have been corrected over the year. Currently it includes a privilege separation for security reasons. Currently has been developed under the name of Sendmail X, however still using the same Sendmail 8 base code. Postfix is one of the best (MTA) open source mail servers designed to be easy to install, configure and secure. This is a good alternative to the widely used MTA sendmail.
Required repositories
Sendmail should be supported on all linux distributions, I have not yet found a bare installation of Debian, Ubuntu or CentOS / Redhat not able to install these mail servers, so you basically don’t need anything and you can proceed to install Sendmail or Postfix directly.
Install Sendmail mail server
To install sendmail mail server is as simple as it could get. You just need to run the command:
1 2 3 4 5 |
# Debian / Ubuntu apt-get install sendmail m4 # CentOS / Redhat / Fedora yum install sendmail m4 |
You should also install m4 just in case you were missing it, this is the implementation of the traditional UNIX macro processor.
That would be all for installing the sendmail, next would be to properly configure the mail server.
Install Postfix mail server
The process is again simple as before, please run the commands:
1 2 3 4 5 |
# Debian / Ubuntu apt-get install postfix # CentOS / Redhat / Fedora yum install postfix |
That again would be all to installing it. Of course the next real step is to configure each of these services, I’ll probably cover this in a new article separately, but as a standalone mail server, that is how both sendmail and postfix are installed.
I’ll see you again in our next tutorial.