imp-query-imap-cache: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/imp-query-imap-cache - from package: php-horde-imp

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/imp-query-imap-cache - from package: php-horde-imp

You may install the required package with command apt-get install {package}
Error in other languages:
imp-query-imap-cache: bevel nie gevind nie
imp-query-imap-cache: comandă negăsită
imp-query-imap-cache: comando não encontrado
imp-query-imap-cache: commande introuvable
imp-query-imap-cache: command not found
imp-query-imap-cache: käsku ei ole
imp-query-imap-cache: không tìm thấy lệnh
imp-query-imap-cache: komanda nerasta
imp-query-imap-cache: Kommando nicht gefunden.
imp-query-imap-cache: kommandot finns inte
imp-query-imap-cache: komut yok
imp-query-imap-cache: nie znaleziono polecenia
imp-query-imap-cache: níor aimsíodh an t-ordú
imp-query-imap-cache: no se encontró la orden
imp-query-imap-cache: no s'ha trobat l'ordre
imp-query-imap-cache: opdracht niet gevonden
imp-query-imap-cache: parancs nem található
imp-query-imap-cache: perintah tidak ditemukan
imp-query-imap-cache: príkaz nenájdený
imp-query-imap-cache: příkaz nenalezen
imp-query-imap-cache: команда не найдена
imp-query-imap-cache: командата не е открита
imp-query-imap-cache: 命令找不到
imp-query-imap-cache: コマンドが見つかりません