CentOS去除"You have new mail in /v
2018-07-05 本文已影响0人
信仰与初衷
- 方法一:关闭sendmail服务
echo "unset MAILCHECK">> /etc/profile;
source /etc/profile
- 方法二: 关闭sendmail的功能
chmod 0 /usr/sbin/sendmailmv /usr/sbin/sendmail /usr/sbin/sendmail.bakln -s /var/qmail/bin/sendmail /usr/sbin/sendmai
- 方法三:清空 /var/spool/mail/root日志
cat /dev/null > /var/spool/mail/rootcat /dev/null>;/var/spool/mail/root
- 方法四:root邮件转发到自己的邮箱
/etc/log.d/logwatch.conf
添加MailTo = root,xxx@xxx.com
或
/etc/aliases
添加root: xxx@xxx.com