If you have just installed Postfix or Sendmail it can be helpful to test if everything is configured correctly. Often you want to do this from the commandline without having to install an entire email client. You can do this by installing a few simple command line mail utilities.
apt-get update apt-get install mailutils
Then pipe a message to the command:
echo testing | mail -s test_subject myemail@example.com
If the mail doesn’t arrive then you can reconfigure postfix and try again.
dpkg-reconfigure postfix
I hope this helps someone.
When I do apt-get install mailutils it tells me there’s no such package. I’ve tried apt-cache search even, mailutils does not seem to exist.
First execute apt-get update and then try to install mailutils
Thanks. I’ve added that into the instructions.