opendkim-stats command not found

In this troubleshooting guide we learn how to fix opendkim-stats command not found error message

Introduction

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

opendkim-stats: command not found

or when using sudo you get the following error message

sudo: opendkim-stats: command not found

Solutions to opendkim-stats: command not found

How To Fix opendkim-stats: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu opendkim-stats is provided by opendkim-tools package.

opendkim-tools is:

The OpenDKIM Project is a community effort to develop and maintain a C library for producing DKIM-aware applications and an open source milter for providing DomainKeys Identified Mail (DKIM) service.

This package contains command line tools for the OpenDKIM mail filter (Milter). The following tools are included:

  • opendkim-genkey
  • opendkim-genzone
  • opendkim-atpszone
  • opendkim-testkey
  • opendkim-testmsg
  • opendkim-spam
  • opendkim-stats
  • opendkim-gengraphs
  • opendkim-genstats
  • opendkim-importstats
  • opendkim-expire

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

sudo apt-get -y install opendkim-tools

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

You can also use apt command to install opendkim-tools.

sudo apt -y install opendkim-tools

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

sudo aptitude install opendkim-tools

Summary

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