celliott

Well-Known Member
Jan 2, 2006
460
0
166
United Kingdom
Hi,

You used to be able to have a short script to notify you via email when someone logs in as root, however on some CentOS 5 + cPanel servers this isnt working, it's returning:

mail: command not found

Any ideas?
 

kampret

Member
Jun 21, 2007
17
0
51
yum install mail --> No package mail available.
you should run :

----------------------------
yum install mailx
----------------------------
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
23
143
Houston, TX
cPanel Access Level
Root Administrator
kampret is correct. The mail command should be present by default on CentOS 5. It is provided by the mailx package.

Code:
# which mail
/bin/mail
# rpm -q --whatprovides /bin/mail
mailx-8.1.1-44.2.2
Installing mailx using yum will make the mail command available.