Installing Postfix:
sudo apt update && apt upgrade -y
sudo apt install postfix -y
Changing the Postfix Configuration:
sudo postconf -e 'home_mailbox= Maildir/'
sudo postconf -e 'virtual_alias_maps= hash:/etc/postfix/virtual'
sudo nano /etc/postfix/virtual
paste
[email protected] quick
[email protected] quick
sudo postmap /etc/postfix/virtual
sudo systemctl restart postfix
sudo ufw allow Postfix
Installing the Mail Client:
echo 'export MAIL=~/Maildir' | sudo tee -a /etc/bash.bashrc | sudo tee -a /etc/profile.d/mail.sh
source /etc/profile.d/mail.sh
sudo apt install s-nail
sudo nano /etc/s-nail.rc
paste
set emptystart
set folder=Maildir
set record=+sent
echo 'init' | s-nail -s 'init' -Snorecord quick
ls -R ~/Maildir
Testing the Client:
s-nail
nano ~/test_message
type test message
Hello,
This is a test. Please confirm receipt!
cat ~/test_message | s-nail -s 'Test email subject line' -r [email protected] [email protected]
s-nail
file +sent
example.com