mailstats: 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/mailstats - from package: sendmail

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

On Debian possible default full paths are:

/usr/sbin/mailstats - from package: sendmail-bin

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