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
Get Ubuntu Server Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.