getmails: 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 Debian possible default full paths are:

/usr/bin/getmails - from package: getmail4

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