esmtp command not found

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

Introduction

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

esmtp: command not found

or when using sudo you get the following error message

sudo: esmtp: command not found

Solutions to esmtp: command not found

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

In Ubuntu esmtp is provided by esmtp package.

esmtp is:

ESMTP is a user configurable relay-only Mail Transfer Agent (MTA) with a sendmail-compatible syntax. It’s based on libESMTP supporting the AUTH (including the CRAM-MD5 and NTLM SASL mechanisms) and the StartTLS SMTP extensions.

ESMTP does not receive mail, expand aliases or manage a queue but can deliver mail locally via an MDA.

This package contains the esmtp program.

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

sudo apt-get -y install esmtp

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

You can also use apt command to install esmtp.

sudo apt -y install esmtp

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

sudo aptitude install esmtp

Summary

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