hapolicy command not found

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

Introduction

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

hapolicy: command not found

or when using sudo you get the following error message

sudo: hapolicy: command not found

Solutions to hapolicy: command not found

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

In Ubuntu hapolicy is provided by hapolicy package.

hapolicy is:

Hapolicy enables high availability, weighted loadbalancing and a fallback action for postfix policy delegation services. Invoked via postfix spawn it acts as a wrapper that queries other policy servers via tcp connection. The order of the service queries can be influenced by assigning a specific priority and weight to each service.

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

sudo apt-get -y install hapolicy

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

You can also use apt command to install hapolicy.

sudo apt -y install hapolicy

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

sudo aptitude install hapolicy

Summary

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