Mail server

Configuring a mail server involves two aspects:

  • πŸ“© Sending mails
  • πŸ“¨ Receiving mails

To avoid having our emails marked as spam, we have to properly configure our mail server and DNS records.

You can send emails after configuring an MTA using:

$ sudo apt install mailutils
$ echo "body" | mail -s "subject" email


Postfix (0.3k ⭐) is a well-known MTA.

$ sudo apt install postfix
$ sudo nano /etc/postfix/
# edit those lines to match:
# inet_interfaces = loopback-only
# mydestination = $myhostname, localhost.$mydomain, $mydomain
$ sudo systemctl restart postfix

πŸ‘» To-do πŸ‘»

Stuff that I found, but never read/used yet.