spfquery.mail-spf-perl command not found

In this troubleshooting guide we learn how to fix spfquery.mail-spf-perl command not found error message

Introduction

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

spfquery.mail-spf-perl: command not found

or when using sudo you get the following error message

sudo: spfquery.mail-spf-perl: command not found

Solutions to spfquery.mail-spf-perl: command not found

How To Fix spfquery.mail-spf-perl: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu spfquery.mail-spf-perl is provided by spf-tools-perl package.

spf-tools-perl is:

A collection of Sender Policy Framework (SPF) tools that are based on the fully RFC-conforming Mail::SPF Perl module. The following tools are included in this package:

  • spfquery: A command-line tool for performing SPF checks.
  • spfd: A daemon for services that perform SPF checks frequently.

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

sudo apt-get -y install spf-tools-perl

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

You can also use apt command to install spf-tools-perl.

sudo apt -y install spf-tools-perl

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

sudo aptitude install spf-tools-perl

Summary

In this tutorial we learn how to fix spfquery.mail-spf-perl command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.