How To Setup A Mail Server On Ubuntu 18.04 | How To Install and Configure Postfix on Ubuntu 18.04
In this tutorial you will learn how to install and configure Postfix on your Ubuntu Linux. You can use it on vps or in desktop.
0:00:00 - Intro
0:00:56 - Prerequisites
0:02:10 - Step 1 — Install Postfix
0:06:15 - Step 2 — Tweak the Postfix Configuration
0:08:17 - Step 3 — Map Mail Addresses to Linux Accounts
0:10:14 - Step 4 — Adjust the Firewall
0:11:00 - Step 5 — Setting up the Environment to Match the Mail Location
0:12:35 - Step 6 — Install and Configure the Mail Client
0:14:31 - Step 7 — Initialize the Maildir and Test the Client
0:18:38 - Conclusion
Great music here ➡ / @dreamheaven
Commands:
sudo apt update
sudo DEBIAN_PRIORITY=low apt install postfix
sudo dpkg-reconfigure postfix
sudo postconf -e 'home_mailbox= Maildir/'
sudo postconf -e 'virtual_alias_maps= hash:/etc/postfix/virtual'
sudo nano /etc/postfix/virtual
[email protected] sammy
[email protected] sammy
sudo postmap /etc/postfix/virtual
sudo systemctl restart postfix
sudo ufw allow Postfix
echo 'export MAIL=~/Maildir' | sudo tee -a /etc/bash.bashrc | sudo tee -a /etc/profile.d/mail.sh
sudo apt install s-nail
sudo nano /etc/s-nail.rc
. . .
set emptystart
set folder=Maildir
set record=+sent
echo 'init' | s-nail -s 'init' -Snorecord sammy
ls -R ~/Maildir
nano ~/test_message
Hello,
This is a test. Please confirm receipt!