opendkim-default-keygen: 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/sbin/opendkim-default-keygen - from package: opendkim

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