✉️
Networking & Server

Postfix

Mail transfer agent (MTA) for sending email

🐧 Linux🍎 Mac🪟 Windows📋 Quick reference →
Reviewed: Tested on: Kubernetes 1.29 · Terraform 1.8 · Ubuntu 22.04

What is this?

Postfix receives and sends email for your domain — the engine behind most Linux mail servers.

📁

Config files for Postfix

Where to create or edit the main configuration — paths below match the setup steps.

  • /etc/postfix/main.cf

    Location: Postfix server

    Hostname, relay, and mailbox settings

📥

Step 01

Install Postfix

(01)Install Postfix

Linux
1sudo apt-get install -y postfix
2# Select 'Internet Site' during install
⚙️

Step 02

Configure Postfix

(01)Configure Postfix

Linux
1sudo nano /etc/postfix/main.cf
2sudo systemctl restart postfix
3echo test | mail -s 'Test' you@example.com

Step 03

Verify

(01)Verify installation

Linux
1sudo systemctl status postfix
2mailq