newaliases command not found

In this troubleshooting guide we learn how to fix newaliases command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

newaliases: command not found

or when using sudo you get the following error message

sudo: newaliases: command not found

Solutions to newaliases: command not found

How To Fix newaliases: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu newaliases is provided by msmtp-mta package.

msmtp-mta is:

msmtp is an SMTP client that can be used to send mails from Mutt and probably other MUAs (mail user agents). It forwards mails to an SMTP server (for example at a free mail provider), which takes care of the final delivery. Using profiles, it can be easily configured to use different SMTP servers with different configurations, which makes it ideal for mobile clients.

This package is compiled with SASL and TLS/SSL support.

This package provides the regular MTA program.

To fix this problem, we can install more using the command below.

sudo apt-get -y install msmtp-mta

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install msmtp-mta.

sudo apt -y install msmtp-mta

Or if you have aptitude installed you can use the following command.

sudo aptitude install msmtp-mta

Summary

In this tutorial we learn how to fix newaliases command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.