policy-test command not found

In this troubleshooting guide we learn how to fix policy-test command not found error message

Introduction

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

policy-test: command not found

or when using sudo you get the following error message

sudo: policy-test: command not found

Solutions to policy-test: command not found

How To Fix policy-test: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu policy-test is provided by postgrey package.

postgrey is:

This package provides a policy server for Postfix to implement “greylisting”.

Greylisting is a spam filtering method that rejects email from external servers on the first try. Spammers don’t usually retry sending their messages, whereas legitimate mail servers do.

While Postgrey is designed for use with Postfix, it can also be used with Exim.

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

sudo apt-get -y install postgrey

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

You can also use apt command to install postgrey.

sudo apt -y install postgrey

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

sudo aptitude install postgrey

Summary

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