Sending e-mails with Postfix
In this recipe, we will set up Postfix Mail Transfer Agent (MTA). This will be a very basic setup which will enable us to send and receive e-mails from our server. Postfix is an open source MTA which routes e-mails to their destination. It is a default MTA for Ubuntu and is available in Ubuntu's main package repository.
Getting ready
You will need access to a root account or an account with sudo
privileges.
A domain name (FQDN) is required while configuring Postfix. You can configure your local server for testing, but make sure that you set the proper host entries and hostname.
How to do it…
Follow these steps to send e-mails with Postfix:
Install Postfix and
mailutils
with the following commands:$ sudo apt-get update $ sudo apt-get install postfix mailutils -y
The installation process will prompt you to enter some basic configuration details. When asked for General type of mail configuration:, select Internet Site and then click on <Ok>:
On the next screen,...