spfquery.libspf2: 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

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/spfquery.libspf2 - from package: libspf2-progs

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

On Debian possible default full paths are:

/usr/bin/spfquery.libspf2 - from package: spfquery

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