最后行添加

vi /root/.bashrc

dateTime=`date +%Y%m%d-%H:%M`

echo "root login" |mail -s "$dateTime root login" 11111@sina.com