You have new mail in /var/spool/mail/root

1、在进入系统的时候经常提示You have new mail in /var/spool/mail/root

echo “unset MAILCHECK” >> /etc/profile

source /etc/profile

关闭sendmail的功能:
chmod 0 /usr/sbin/sendmail
mv /usr/sbin/sendmail /usr/sbin/sendmail.bak
ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

清空 /var/spool/mail/root日志
cat /dev/null > /var/spool/mail/root
cat /dev/null>;/var/spool/mail/root

2、root邮件转发到自己的邮箱
方法一:
修改此文件
/etc/log.d/logwatch.conf
添加MailTo = root,[email protected]

方法二
/etc/aliases
添加root: [email protected]



你可能感兴趣的:(Linux问题)