以下仅供参考,实际环境需根据各自sendmail日志文件路径操作。
# 关闭sendmail
service sendmail stop
chkconfig --list sendmail
chkconfig --level 2345 sendmail off
# 删除mail文件夹
rm -rf /var/spool/mqueue && mkdir /var/spool/mqueue
rm -rf /var/spool/clientmqueue && mkdir /var/spool/clientmqueue
rm -rf /var/spool/mail && mkdir /var/spool/mail
# 删除logwatch
mv /etc/cron.daily/0logwatch /etc
rm -rf /var/cache/logwatch/*